pom:
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
如果不排除,配置文件直接打包到jar里,项目启动正常。
<excludes>
<exclude>config/*.properties</exclude>
</excludes>
如果排除了properties文件,项目启动失败,找不到配置文件。nested exception is java.io.FileNotFoundException: class path resource [config/datasource.properties] cannot be opened because it does not exist
标签:
你要问的问题是什么?被你排除了,所以找不到,这一点问题没有