Maven will only copy all files in the resource directory to the classpath, and only .java files will be compiled and output in the source directory. If you want to output other files in the source directory, you must configure resource For details, see http ://www.programgo.com/arti...
src/main/java已经配成了source builder path(我觉得等同于mark as resources ,编译打包后看classes文件夹可以验证我的说法),你要拿mapper就层级特别深com/.../sqlMap/XXX.xml。 所以就参照楼上建议,新建src/main/resources/文件夹并将其设置成resources,将sqlMap的xmlPut the file in
Your project structure is obviously maven. You can explicitly configure the resource file directory in the pom.xml file
Maven will only copy all files in the resource directory to the classpath, and only .java files will be compiled and output in the source directory. If you want to output other files in the source directory, you must configure resource
For details, see http ://www.programgo.com/arti...
Resources are placed under src/main/resources/.
The following part of main is parallel to java. Create a resources directory, which can be set to "resources"
Your java directory is already "Sources"
src/main/java
已经配成了source builder path
(我觉得等同于mark as resources
,编译打包后看
classes
文件夹可以验证我的说法),你要拿mapper
就层级特别深com/.../sqlMap/XXX.xml
。所以就参照楼上建议,新建
src/main/resources/
文件夹并将其设置成resources
,将sqlMap的xml
Put the file in