[英]How can I put properties outside the project and load both properties project properties and outside project properties?
I'm setting up different projects on the same server and want to put the same properties on some path outside the tomcat folder and load project properties as well how can I achieve it so that load both project properties and properties on path.我在同一台服务器上设置不同的项目,并希望将相同的属性放在 tomcat 文件夹之外的某个路径上,并加载项目属性以及如何实现它以便在路径上加载项目属性和属性。
You have asked 2 questions:你问了2个问题:
To load both properties you can load both with different var like:要加载这两个属性,您可以使用不同的 var 加载这两个属性,例如:
<.-- loading properties outside the project --> <resource-bundle> <base-name>com.yourpackage.CustomResourceBundle</base-name> <var>msgCustom</var> </resource-bundle> <.-- loading properties inside the project --> <resource-bundle> <base-name>com.yourpackage.resources.view</base-name> <var>msg</var> </resource-bundle>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.