loading properties file in spring

后端 未结 3 967
星月不相逢
星月不相逢 2021-01-14 01:28

One of our team has implemented loading properties this way (see pseudo code below) and advises this approach is right as the client application using this is free to keep t

3条回答
  •  长情又很酷
    2021-01-14 02:21

    +1 for Dave's suggestion. You should be using PropertyPlaceholderConfigurer for loading\reading properties. Here is the example i just pulled out from my previous project if you wonder how to use this. This example is for loading multiple properties files but the concept is same. Good luck.

    
        
            
                classpath:config.properties
            
        
    
    
    
            
    
    
    
        
    
    

提交回复
热议问题