在我web.xml
的声明中,我ContextLoaderListener
以这种方式配置 spring 应用程序:
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
在我的一个 spring 配置 xml 文件中,我使用不同的beans 配置文件进行开发和生产。
<beans profile="production">
<bean />
</beans
<beans profile="development">
<bean />
</beans
我如何在 ? 中设置默认 bean 配置文件web.xml
?ContextLoaderListener
使用而不是spring servlet时是否有类似以下内容:
<init-param>
<param-name>spring.profiles.active</param-name>
<param-value>production</param-value>
</init-param>