spring PreferencesPlaceholderConfigurer对properties文件读取值
[color=red][b]1.创建config.propertites文件 [/b][/color] [code="txt"] key=value [/code] [color=red][b]2.配置文件applicationContext.xml[/b][/color] [code="xml"] classpath:*.properties [/code] [color=red][b]3.java类中引用[/b][/color] [code="java"] // id=setting中找key的值 @Value("${key}") private String key; [/code]