springboot启动突然报错Could not resolve placeholder 'spring.datasource.driver-class-name'

之前好好的项目,今天启动突然报错Could not resolve placeholder 'spring.datasource.driver-class-name'

按照网友的方法,添加了

@PropertySource(value = "classpath:application.properties", ignoreResourceNotFound = true)

,结果又出现,[application.properties] cannot be opened because it does not exist。重启也试了,由此山穷水尽。

最后发现,只要在maven中,先clean,然后在install就好了。

遇到该问题,同样山穷水尽的朋友们,可以试一下。

猜你喜欢

转载自blog.csdn.net/qq_32791023/article/details/85090747
今日推荐