首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 互联网 >

PropertyPlaceholderConfigurer的应用,使用properties属性

2012-10-06 
PropertyPlaceholderConfigurer的使用,使用properties属性1 首先先安装插件 propertiesEditor (附件有最新

PropertyPlaceholderConfigurer的使用,使用properties属性
1 首先先安装插件 propertiesEditor (附件有最新版本)

2 在 /html.properties 里,设置属性

3 在需要使用的地方加入 @Property("xxxx_Apply_Create_SuccMessage") 这样的声明 xxxx_Apply_Create_SuccMessage,为properties 里面配置的属性名称。

xxxx_Apply_Create_SuccMessage=文字<a class="c05" target="_blank" href="http://photo.163.com/group/{0,number,0.##########}/manage/guide/">{1}</a>这是一段文字<a class="c05" target="_blank" href="http://photo.163.com/group/{0,number,0.##########}/manage/guide/">还是文字&gt;&gt;</a>


4 系统启动是会自动将此属性注入。
@Property("xxxx_Apply_Create_SuccMessage")    private String xxxx_Apply_Create_SuccMessage;    String message = MessageFormat.format(xxxx_Apply_Create_FailMessage, applyCreate.getName());

   

热点排行