1.POM中build-resources-resource添加资源指向
lx-service ... src/main/resources true
2.POM中build-plugins-plugin添加war打包插件配置
org.apache.maven.plugins maven-war-plugin true src/main/resources/profile WEB-INF **/web.xml
3.src/main/resources/profile下添加web.xml,其中可以使用maven profiles定义的变量
spring.profiles.default ${mvn.spring.profile}
4.打包的时候会自动修改该值。
5.注意,本地开发的时候仍然读取src/main/webapp/WEB-INF/web.xml中的spring.profiles,