Is there a shorthand for creating a String constant in Spring context XML file?

后端 未结 4 1002
[愿得一人]
[愿得一人] 2021-02-01 14:36

I need to define a string value in Spring context XML file that is shared by multiple beans.

This is how I do it:

<         


        
4条回答
  •  天命终不由人
    2021-02-01 14:57

    You can use PropertyPlaceholderConfigurer and keep values in xml:

    
    
    
      
        
          All beans need me :)
        
      
    
    

    Then you reference it with:

    
      
    
    

提交回复
热议问题