星空网 > 软件开发 > ASP.net

配置文件,环境配置和war报分离,方便生产更改

在生产环境实现配置文件和war包 的分离,为方便在必要的时候进行一定的更改,可以避免修改包,但是需要重启

最初为这样的选择配置,单不知为何未生效,修改为配置2配置方法,但不灵活,待跟进。
配置1:

<context:property-placeholderignore-resource-not-found="true"location="file:${CONF_PATH}/${sysconfig.properties.file},classpath*:/${sysconfig.properties.file}" />

配置2:
<!-- 环境配置和war包分离 以外部配置为准-->

<context:property-placeholder order="1" ignore-resource-not-found="true"ignore-unresolvable="true" location="file:${CONF_PATH}/${sysconfig.properties.file}" /><context:property-placeholder order="2" ignore-resource-not-found="true" ignore-unresolvable="false"location="classpath*:/${sysconfig.properties.file}" />

 

注:order 值越小,优先级越高




原标题:配置文件,环境配置和war报分离,方便生产更改

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流