一般mvn如果配置有环境,直接在tomcat server中无法直接启动,需要在vm或者tomcat启动中添加profile启动。

pom.xml中添加:

在<profile>中添加默认profile,<activation><activeByDefault>true</activeByDefault></activation>

然后在vm中添加
-Dspring.profiles.default='local'
另一种激活:
-Dspring.profiles.active=dev
在Server中打开 :选择 Open launcher Configuration
在vm中添加以上内容,或者在environment添加以上内容即可。

 



posted on 2019-03-21 09:19  zhaoqiang1980  阅读(657)  评论(0编辑  收藏  举报