maven src/test/resources 下的logback-test.xml 读取 properties文件中的key-value值
<profiles>
<profile>
<id>test-cd</id>
<properties>
<env>test-cd</env>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>sit-cd</id>
<properties>
<env>sit-cd</env>
</properties>
</profile>
<profile>
<id>release</id>
<properties>
<env>release</env>
</properties>
</profile>
</profiles> <build>
<filters>
<filter>src/main/filters/filter-${env}.properties</filter>
</filters>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>*.xml</include>
</includes>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
<includes>
<include>*.xml</include>
</includes>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
maven src/test/resources 下的logback-test.xml 读取 properties文件中的key-value值的更多相关文章
- Spring下读取properties文件
由于在spring的xml文件中配置了 <bean id="validator" class="org.springframework.validation.bea ...
- [转]Maven项目读取src.main.resources下的文件
要取编译后的路径,而不是你看到的src/main/resources的路径.如下: URL url = MyTest.class.getClassLoader().getResource(" ...
- java在src/test/resourse下读取properties文件
package com.jiepu; import java.io.File; import java.net.URISyntaxException; import java.util.Map; im ...
- maven在windows环境下加载settings.xml文件
今天发现maven在windows环境下加载的settings.xml文件是c:下的,就算修改conf下的settings.xml里的<localRepository>给他明确指向也没用.
- maven 根据P参数值打包动态修改properties文件中值或一定properties
需求:由于最近开发clover项目 ,没有使用spring,更没有使用任何框架,而使用J2EE的web工程,所以连接ZK和MongoDB.Redis等服务器需用指定properties文件, 而目前公 ...
- maven 项目打包时无法解析读取properties文件
在做项目时遇见一个问题,无法解析properties文件的 内容 异常为 Could not resolve placeholder ......... 在此之前均有做相关的 配置 但是从未出现过如上 ...
- maven打war包注意之xml、properties文件没打进去解决方法
maven项目在ide中编译出的war包一般不会有很多问题. 但是经过集成环境打war包会出现war包中打不进xml.properties等文件.这样打war包不会报错,但是war包放进tomcat中 ...
- maven 打包不全(xml,properties文件没打进包)解决方案
在pom.xml的build标签中加入以下代码即可 <build> <resources> <resource> ...
- Linux下执行的java命令重定向到文件中的方法
在Linux下通常会执行如:java -version 的命令, 但是,命令只是打印到了屏幕上不能重定向到文件中或标准输出流中. 此时需要将错误输出流重定向到标准输出流中就可以得到了. 比如:java ...
随机推荐
- Source not found for AeceManager$$FastClassByCGLIB$$15dcd49c.invoke(int, Object, Object[]) line: not available 问题解决
一般出现这个问题,是manager的问题.控制台没有报错.是调试出来的.. 解决办法: 在调用此方法的manager里的方法上加上try ...catch 重新启动调试, 就可在控台看到问题所在. ...
- [转]mysql导入导出数据中文乱码解决方法小结
本文章总结了mysql导入导出数据中文乱码解决方法,出现中文乱码一般情况是导入导入时编码的设置问题,我们只要把编码调整一致即可解决此方法,下面是搜索到的一些方法总结,方便需要的朋友. linux系统中 ...
- 4 - 执行TestNG
TestNG以如下几种方式被调用 命令行 ant Eclipse IntelliJ's IDEA 这部分对如何使用命令行方式调用TestNG进行阐述. 假设TestNG已经在你的classpath中, ...
- TestNG目录
1 - 简介 2 - 注解 3 - testng.xml 4 - 执行 TestNG 5 - 测试方法, 测试类 和 测试组 5.1 - 测试方法 5.2 - 测试组 5.3 ...
- smarty 的学习----ubuntu下初步配置
转自:http://blog.csdn.net/ma332567575/article/details/7904124 首先去www.smarty.net下载最新版的Smarty 把下载后的压缩包在网 ...
- 假金币问题-PKUacm1029-ACM
假金币 “Gold Bar”银行收到可靠消息:在前次的N 个金币中有一枚重量不同的假金币(其他金币的重量都相同).经济危机之后他们只有一台天平可用.用这台天平,可以称量出左边托盘中的物体是轻于.重于或 ...
- yii框架基本操作
<?php namespace app\controllers; use yii\web\Controller; use app\models\DemoForm; use app\models\ ...
- 关于android:configChanges的属性
一般在AndroidManifest.xml文件中都没有使用到android:configChanges="keyboardHidden|orientation"配置,当然还是很有 ...
- python学习笔记(一)元组,序列,字典
python学习笔记(一)元组,序列,字典
- 如何自定义RecycleView item的间距
引言 在以前使用ListView和GridView时,设置item之间的间距还是相对比较简单的,因为它们的基本属性里面Android已经定义好了,可以直接设置属性值即可.但Google为了通用性和灵活 ...