Add the following configuration in the POM file <build> <resources> // File configuration under the java directory cannot be loaded <resource> <directory>src/main/java</directory> <includes> <include>**/* .xml</include> </includes> <filtering>true</filtering> </resource> // The file configuration under the resources directory cannot be loaded <resource> <directory>src/main/resources</directory> <includes > <include>**/*.properties</include> <include>**/*.yml</include> <include>**/*.xml</include> </includes> </resource> </resources> </build>
The spring boot startup project cannot load the configuration file or xml file in the resources directory
Guess you like
Origin blog.csdn.net/weixin_45876619/article/details/108911409
Recommended
Ranking