SpringBoot pitfall: Project in MyEclipse, the project configuration file in the resources folder cannot be read

Learning environment:
MyEclipse
problem:
All configuration files under the resources folder (including application.properties, banner.txt and other configuration files) are not read when running the program. (Actually, I found out that the configuration file was not read by checking whether banner.txt took effect.)
Reason:
The reason for this problem is because:
The Java Build Path configuration of the project in MyEclipse was intercepted.
Solution:
Right-click the project --> Build Path --> Configure Build Path. In the Source in Java Build Path, change the Excluded in the resources folder to none (that is, delete the ** inside).

Insert image description here

Insert image description here

Guess you like

Origin blog.csdn.net/Laputa_Castle/article/details/107842739