第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定

spring boot configuration annotation processor not found in classpath

Description:
Field girlProperties in com.imooc.HelloController required a bean of type 'com.imooc.GirlProperties' that could not be found.
Action:
Consider defining a bean of type 'com.imooc.GirlProperties' in your configuration.

誰知道是為什么呀?

正在回答

10 回答

http://img1.sycdn.imooc.com//5fdf555e0001585711060305.jpg

這個(gè)怎么解決啊


0 回復(fù) 有任何疑惑可以回復(fù)我~

spring-boot-configuration-processor加了這個(gè)依賴,鼠標(biāo)也能點(diǎn)進(jìn)去查看,但是右側(cè)maven那里卻顯示沒有加載下來

0 回復(fù) 有任何疑惑可以回復(fù)我~
1、首先要添加這個(gè)配置,并等待依賴更新完成。
<dependency>
???<groupId>org.springframework.boot</groupId>
???<artifactId>spring-boot-configuration-processor</artifactId>
???<optional>true</optional>
</dependency>
2、如果出現(xiàn):Re-run?spring?boot?configuration?annotation?processor?to?update?generate?metadata。
忽略即可。大不了你重新編輯下。再大不了你重啟下IDEA。
3、如果還不行,獲取值還是Null.

那么請檢查你的Model是不是:只有g(shù)etter,而沒有Setter.官方文檔說明了,但是我試了下感覺括號里那句話是胡扯。

http://img1.sycdn.imooc.com//5a88141200012bf912620168.jpg

1 回復(fù) 有任何疑惑可以回復(fù)我~

親測有效,那些說沒用的同學(xué)你確定你其他地方?jīng)]有出錯(cuò)?

在pom.xml導(dǎo)入依賴

<dependency>
??<groupId>org.springframework.boot</groupId>
??<artifactId>spring-boot-configuration-processor</artifactId>
??<optional>true</optional>
</dependency>


1 回復(fù) 有任何疑惑可以回復(fù)我~

我從C#轉(zhuǎn)java? 目前在自學(xué),遇到了一樣的問題,在pom.xml中添加dependency也是不行

1 回復(fù) 有任何疑惑可以回復(fù)我~

一樣,黑色變成了紅色,還是報(bào)錯(cuò)

0 回復(fù) 有任何疑惑可以回復(fù)我~

.....這個(gè)問題是那個(gè)girlProperties類沒注入到Spring容器里,需要在該類上添加注解@component。

2 回復(fù) 有任何疑惑可以回復(fù)我~

加了依賴之后也只是提示從紅色變成了黑色,并沒有消失,你的消失了嗎

1 回復(fù) 有任何疑惑可以回復(fù)我~

添加依賴之后怎么弄啊?

0 回復(fù) 有任何疑惑可以回復(fù)我~

只需要在pom.xml添加一個(gè)依賴,如下:

<dependency>
? <groupId>org.springframework.boot</groupId>
? <artifactId>spring-boot-configuration-processor</artifactId>
? <optional>true</optional>
</dependency>

3 回復(fù) 有任何疑惑可以回復(fù)我~
#1

洋妞honey 提問者

錯(cuò)了。還是不行
2017-04-13 回復(fù) 有任何疑惑可以回復(fù)我~
#2

洋妞honey 提問者 回復(fù) 洋妞honey 提問者

我@component注解注解錯(cuò)地方了
2017-04-13 回復(fù) 有任何疑惑可以回復(fù)我~
#3

僅此而已_104061629 回復(fù) 洋妞honey 提問者

你怎么自己回答自己啊,哈哈,就是要添加這個(gè)依賴才能解決
2017-06-27 回復(fù) 有任何疑惑可以回復(fù)我~
#4

qq_慕仙547661 回復(fù) 洋妞honey 提問者

只是sevice層沒有加@service注解 而已
2019-03-12 回復(fù) 有任何疑惑可以回復(fù)我~
查看1條回復(fù)

舉報(bào)

0/150
提交
取消
2小時(shí)學(xué)會(huì)Spring Boot
  • 參與學(xué)習(xí)       151527    人
  • 解答問題       1132    個(gè)

Spring Boot入門視頻教程,你將學(xué)會(huì)使用Spring Boot快速構(gòu)建應(yīng)用程序

進(jìn)入課程

spring boot configuration annotation processor not found in classpath

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號