Created
November 28, 2017 10:40
-
-
Save bxb100/eed4475f5d9e473b5c2e2a1723b2ca9a to your computer and use it in GitHub Desktop.
idea maven 项目中将java 中配置文件省略, 所以一种解决办法就是设置 pom 文件
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<parent> | |
<artifactId>day98_mybatis</artifactId> | |
<groupId>cn.pers.mybatis</groupId> | |
<version>1.0-SNAPSHOT</version> | |
</parent> | |
<modelVersion>4.0.0</modelVersion> | |
<artifactId>mybatis_jdbc</artifactId> | |
<dependencies> | |
<dependency> | |
<groupId>mysql</groupId> | |
<artifactId>mysql-connector-java</artifactId> | |
</dependency> | |
<dependency> | |
<groupId>org.mybatis</groupId> | |
<artifactId>mybatis</artifactId> | |
</dependency> | |
<dependency> | |
<groupId>org.slf4j</groupId> | |
<artifactId>slf4j-log4j12</artifactId> | |
</dependency> | |
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
</dependency> | |
</dependencies> | |
<!--配置Maven 对resource文件 过滤 --> | |
<build> | |
<resources> | |
<resource> | |
<directory>src/main/resources</directory> | |
<includes> | |
<include>**/*.properties</include> | |
<include>**/*.xml</include> | |
</includes> | |
<filtering>true</filtering> | |
</resource> | |
<resource> | |
<directory>src/main/java</directory> | |
<includes> | |
<include>**/*.properties</include> | |
<include>**/*.xml</include> | |
</includes> | |
<filtering>true</filtering> | |
</resource> | |
</resources> | |
</build> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
resources 中设置同级目录比较推荐