之前好好的項目,今天啓動突然報錯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就好了。
遇到該問題,同樣山窮水盡的朋友們,可以試一下。