How do you configure a Spring bean container to load a Java property file?

前端 未结 6 1109
囚心锁ツ
囚心锁ツ 2021-02-02 01:48

How do you configure a Spring bean container (or application context) to load a Java property file?

JavaWorld article Smartly Load Your Properties explains how to load p

6条回答
  •  暖寄归人
    2021-02-02 02:49

    We use this :

    
        
        
            classpath:test.properties
        
    
    

    Which allows the properties defined there to be used as references in the config files

    For more info see :

    http://static.springsource.org/spring/docs/2.0.x/api/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.html

提交回复
热议问题