課程
/后端開發(fā)
/Java
/SpringBoot開發(fā)常用技術(shù)整合
在5-1配置PropertySource遇到了問題。一直顯示resource.properties不存在。詳情大佬大佬幫忙解決, 非常感謝
2021-01-04
源自:SpringBoot開發(fā)常用技術(shù)整合 5-1
正在回答
?1樓老哥說的在理,檢查一下pom.xml文件有沒有引入jar包
看不到你的pom.xml,可能依賴沒加么,檢查這幾個(gè)地方看看:
1、手工在src/main/resources目錄下是否新建 resource.properties文件,可以直接負(fù)責(zé)application.properties文件放在同目錄下,重命名為resource.properties即可;
2、
@Configuration
……
這些代碼是否寫正確了。
3、pom.xml中依賴
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
是否加了。
BinaryRhythm
舉報(bào)
SpringBoot 極簡開發(fā)的框架整合利器
1 回答org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.imooc.ImoocApplication]; nested exception is java.io.FileNotFoundException: class path resource [calsspath:resource.properties] cannot be opened becau
13 回答拋出一個(gè) Error resolving template template might not exist or might not be accessible 的異常
3 回答Error resolving template "thymeleaf/index", template might not exist or might not be accessible by any of the configured Template Resolvers
3 回答 Could not get a resource from the pool
2 回答項(xiàng)目啟動(dòng)保錯(cuò) field * could not be found
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2021-01-18
?1樓老哥說的在理,檢查一下pom.xml文件有沒有引入jar包
2021-01-14
看不到你的pom.xml,可能依賴沒加么,檢查這幾個(gè)地方看看:
1、手工在src/main/resources目錄下是否新建 resource.properties文件,可以直接負(fù)責(zé)application.properties文件放在同目錄下,重命名為resource.properties即可;
2、
@Configuration
……
這些代碼是否寫正確了。
3、pom.xml中依賴
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
是否加了。