1. 程式人生 > >springboot啟動突然報錯Could not resolve placeholder 'spring.datasource.driver-class-name'

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就好了。

遇到該問題,同樣山窮水盡的朋友們,可以試一下。