博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
maven profile整合spring profile方式
阅读量:4049 次
发布时间:2019-05-25

本文共 957 字,大约阅读时间需要 3 分钟。

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,

 

转载地址:http://dhyci.baihongyu.com/

你可能感兴趣的文章
kprobe学习
查看>>
慢慢欣赏linux phy驱动初始化2
查看>>
慢慢欣赏linux CPU占用率学习
查看>>
2020年终总结
查看>>
Homebrew指令集
查看>>
React Native(一):搭建开发环境、出Hello World
查看>>
React Native(二):属性、状态
查看>>
JSX使用总结
查看>>
React Native(四):布局(使用Flexbox)
查看>>
React Native(七):Android双击Back键退出应用
查看>>
Android自定义apk名称、版本号自增
查看>>
adb command not found
查看>>
Xcode 启动页面禁用和显示
查看>>
【剑指offer】q50:树中结点的最近祖先
查看>>
二叉树的非递归遍历
查看>>
【leetcode】Reorder List (python)
查看>>
【leetcode】Linked List Cycle (python)
查看>>
【leetcode】Linked List Cycle (python)
查看>>
【leetcode】Candy(python)
查看>>
【leetcode】Clone Graph(python)
查看>>