springboot不能加载*.properties

代码检查了无数遍!

如图,这些配置文件直接放在sms-server下面,并没有放在sms-server/src/main/resources下面,所以不是classpath目录下,编译后在sms-server/target/classes目录下没有*.properties文件,而是在sms-server/target目录下!!!

解决方法当然是把*.properties放在classpath目录下,为了编译后sms-server/target/classes目录下有*.properties文件。

猜你喜欢

转载自www.cnblogs.com/theRhyme/p/9118401.html
今日推荐