在idea下面编译项目,输出目录没有properites等文件是因为没有在maven 的pom.xml配置build。
配置方法是在pom.xml下面的project标签里面
<build> <finalName>CFPshop</finalName> <sourceDirectory>${basedir}/src/main/java</sourceDirectory> <resources> <resource> <directory>${basedir}/src/main/resources</directory> <includes> <include>spring/*</include> <include>mybatis/**</include> <include>ehcache.xml</include> <include>jdbc.properties</include> <include>log4j.properties</include> </includes> </resource> </resources> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.7</source> <target>1.7</target> <encoding>UTF-8</encoding> </configuration> </plugin> </plugins> </build>
include 就是要输出的文件