主要问题是没有扫描到配置文件
在pom文件里面<build> </build>中加上以下代码就可以保证能扫描到了
<resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.yml</include> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering>false</filtering> </resource> <resource> <directory>src/main/resources</directory> <includes> <include>**/*.yml</include> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering>false</filtering> </resource> </resources>
原文地址:https://www.cnblogs.com/leyang2019/p/10516117.html
时间: 2024-10-11 23:31:13