2017-03-03 126 views
1

我需要在一個tomcat8實例上部署幾個不同的war文件。多個spring.active.profiles在一個tomcat實例中

有些war-files需要spring.active.profile才能成爲「生產」,其他一些war文件需要這個值才能「測試」。

這可以以某種方式實現嗎?

我,現在我可以在/ etc /默認/ tomcat8的-Dspring.active.profile =生產但那是全球...我需要爲每個戰爭文件的個性化解決方案...

燦有人幫忙嗎?

回答

0

只需添加到每個Web應用程序web.xml文件中的配置文件名稱:

<context-param> 
    <param-name>spring.profiles.active</param-name> 
    <param-value>production</param-value> 
</context-param>