class path resource [resource.properties] cannot be opened because it does not exist
在5-1配置PropertySource遇到了問(wèn)題。一直顯示resource.properties不存在。詳情大佬大佬幫忙解決, 非常感謝
在5-1配置PropertySource遇到了問(wèn)題。一直顯示resource.properties不存在。詳情大佬大佬幫忙解決, 非常感謝
2021-01-04
舉報(bào)
2021-01-18
?1樓老哥說(shuō)的在理,檢查一下pom.xml文件有沒(méi)有引入jar包
2021-01-14
看不到你的pom.xml,可能依賴沒(méi)加么,檢查這幾個(gè)地方看看:
1、手工在src/main/resources目錄下是否新建 resource.properties文件,可以直接負(fù)責(zé)application.properties文件放在同目錄下,重命名為resource.properties即可;
2、
@Configuration
……
這些代碼是否寫(xiě)正確了。
3、pom.xml中依賴
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
是否加了。