pom中属性动态替换resources的占位符
来源:互联网 发布:网络英语热词如low 编辑:程序博客网 时间:2024/06/17 14:10
多环境时,pom中属性动态替换resources的占位符
1.pom.xml需如下配置:
<build> <finalName>webdemo</finalName> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering><!-- 必须设置--> </resource> </resources> </build>
<profiles> <profile> <id>dev</id> <properties> <abc.a>123</abc.a><!--自定义的属性--> </properties> <activation> <property><name>environment.type</name><value>dev</value></property> </activation> </profile> <profile> <id>test</id> <properties> <abc.a>333</abc.a> </properties> </profile> </profiles>
2.在resources的目录得xml,properties文件中都可以用${abc.a} 替换
<bean id="mytest" class="com.lifeng.webdemo.Test3"> <property name="a" value="${abc.a}"/> </bean>
3.打包后target
阅读全文
0 0
- pom中属性动态替换resources的占位符
- Spring中使用PropertyPlaceholderConfigurer占位符得不到替换的问题
- mvn打包替换jar包中xml的占位符
- 配置文件中,字符串占位符替换
- 简单的string占位符替换
- 简单的string占位符替换
- 简单的string占位符替换
- pom.xml中的占位符
- java 占位符替换
- 替换占位符
- 一个替换java字符串中${}或者{}等占位符的工具类
- Spring属性占位符PropertyPlaceholderConfigurer的使用
- Spring属性占位符PropertyPlaceholderConfigurer的使用
- Spring属性占位符PropertyPlaceholderConfigurer的使用
- Spring属性占位符PropertyPlaceholderConfigurer的使用 ${}
- Spring属性占位符PropertyPlaceholderConfigurer的使用
- Spring属性占位符PropertyPlaceholderConfigurer的使用
- 替换properties文件 占位符
- C# 计算两个字符串相识度
- ARKit教程推荐
- mysql 两表join与in子查询的比较
- Lucene6之Ansj插件过滤停用词
- Oracle中给表添加删除主外键约束
- pom中属性动态替换resources的占位符
- SpringMVC下载文件
- 快速计算梯度的魔法--反向传播算法
- ActFramework 接口自动绑定
- 1045. 快速排序(25)
- 2D/3D文档查看器ABViewer发布v12,大大提高PDF转DWG的速度丨附下载
- 92. Reverse Linked List II
- Vector (对象要向下转型)
- 深度学习在 iOS 上的实践 —— 通过 YOLO 在 iOS 上实现实时物体检测