[英]Spring profiles set multiple default profiles in web.xml
I have looked in the documentation of Spring profiles. 我查看了Spring配置文件的文档。
They clearly say that multiple active profiles are possible. 他们明确表示可以使用多个活动配置文件。
This you could find back here . 你可以在这里找到 。
Does this also means multiple default profiles are possible? 这是否也意味着可以使用多个默认配置文件?
You can register your default profile in your web.xml
by this way : 您可以通过以下方式在
web.xml
注册默认配置文件:
<context-param>
<param-name>spring.profiles.default</param-name>
<param-value>HOSTED</param-value>
</context-param>
But how can I register in the web.xml
multiple default profiles (or multiple active)? 但是如何在
web.xml
注册多个默认配置文件(或多个活动)?
Just add them as a comma separated list: 只需将它们添加为逗号分隔列表:
<context-param>
<param-name>spring.profiles.default</param-name>
<param-value>HOSTED, ANOTHER_DEFAULT_PROFILE</param-value>
</context-param>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.