国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component解決

這篇具有很好參考價(jià)值的文章主要介紹了org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component解決。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

今天剛剛學(xué)了SpringMVC,出現(xiàn)了這個(gè)問題,來解決一下。

這個(gè)問題就是因?yàn)镴DK版本和Spring的版本沖突導(dǎo)致的。

我使用的是JDK17,版本比較高,需要相應(yīng)的包進(jìn)行支持。

直接上依賴吧。

最終我使用的就是下面兩個(gè)。使用這兩個(gè)可以說跑起來沒有什么問題,如果更改不適當(dāng)可能僅僅只能解決我文章標(biāo)題的問題,接著又出現(xiàn)其它的問題。比如java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet,如果出現(xiàn)這個(gè)問題就看看下面那個(gè)依賴的問題,改改總能搞定的。

<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-webmvc</artifactId>
  <version>5.3.23</version>
</dependency>

<dependency>
  <groupId>javax.servlet</groupId>
  <artifactId>javax.servlet-api</artifactId>
  <version>4.0.1</version>
  <scope>provided</scope>
</dependency>

同樣還需要注意的是Tomcat的版本。我使用的是Tomcat9,之前也用過7、8、10,但最終還是選擇了9。Tomcat版本最好也多注意一下,說不定什么時(shí)候就給你冒出個(gè)奇奇怪怪的問題。

然后附上一下相應(yīng)包的對(duì)應(yīng)版本:

Spring:

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component解決

地址:https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Versions

Servlet:

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component解決

地址:https://tomcat.apache.org/whichversion.html

按照上面的圖中的版本對(duì)應(yīng)關(guān)系更改自己的,最后應(yīng)該都是能夠成功的。如果報(bào)錯(cuò)的時(shí)候是一些奇奇怪怪的問題,不妨先考慮一下自己的版本有沒有問題。

最后再附上一下maven中央倉庫的地址,也許能用上。

地址:https://mvnrepository.com/文章來源地址http://www.zghlxwxcb.cn/news/detail-437002.html

到了這里,關(guān)于org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component解決的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 關(guān)于org.springframework.beans.factory.NoSuchBeanDefinitionException

    關(guān)于org.springframework.beans.factory.NoSuchBeanDefinitionException

    這個(gè)報(bào)錯(cuò)可能是因?yàn)椋?1. spring的xml配置文件Bean中的id和getBean的id不一致 spring的配置文件中: 而程序中 applicationContext.getBean(“studenta”, Student.class)中的是studenta而spring配置文件的id是student,不一致。 2. 是否是忘記加注解了 @Resource或@Autowired都可以(@Resource是jdk自帶的) 3.如果

    2024年02月13日
    瀏覽(18)
  • Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException

    Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException

    修改為: ? ?解決辦法: BookDao層中添加@Mapper, 告訴springboot這是一個(gè)mybatis代理接口類型, 快來掃描我!, 由此生成代理對(duì)象 原因三:?? 測試類ModuleSetApplicationTests和引導(dǎo)程序ModuleSetApplication沒有在同名包下, 例如下圖, ModuleSetApplication類在com.itheima下ModuleSetApplicationTests沒有直接在com

    2024年02月11日
    瀏覽(26)
  • exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException

    exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException

    原因: Spring Boot異常org.springframework.beans.factory.NoUniqueBeanDefinitionException:沒有可用的合格Bean類型:預(yù)期匹配單個(gè)Bean,但是匹配到了多個(gè),當(dāng)該bean被自動(dòng)裝配時(shí)與Spring Boot應(yīng)用程序上下文中的兩個(gè)或多個(gè)加載的Bean匹配時(shí),就會(huì)發(fā)現(xiàn)該異常。 Spring Boot允許從一個(gè)接口或抽象類創(chuàng)

    2024年02月09日
    瀏覽(30)
  • 報(bào)錯(cuò):Caused by org.springframework.beans.factory.BeanCreationException

    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘transactionManager’ defined in class path resource [spring/spring-service.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type ‘java.lang.String’ to

    2024年02月13日
    瀏覽(28)
  • org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean (啟動(dòng)項(xiàng)目報(bào)錯(cuò))

    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean (啟動(dòng)項(xiàng)目報(bào)錯(cuò))

    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name \\\'shiroFilter\\\' defined in class path resource [com/cdzn/mhs/config/ShiroConfig.class]: Unsatisfied dependency expressed through method \\\'shiroFilter\\\' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with n

    2024年02月10日
    瀏覽(22)
  • org.springframework.beans.factory.BeanCreationException: Error creating bean with name

    異常日志:[WARNING] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name \\\'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping\\\': Initialization of bean failed; nested exception is org.springframework.beans.fac

    2024年02月02日
    瀏覽(36)
  • 報(bào)錯(cuò)org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name...

    報(bào)錯(cuò)org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name...

    剛學(xué)SpringBoot,今天啟動(dòng)的時(shí)候報(bào)錯(cuò)了,長長的一堆報(bào)錯(cuò)信息 報(bào)錯(cuò)信息大概說的是創(chuàng)建UserController bean出現(xiàn)錯(cuò)誤 下面又說創(chuàng)建UserService bean出現(xiàn)錯(cuò)誤和UserMapper也出錯(cuò) 于是我百度了一下,都說沒加注解,我檢查了一下,改加的都加了呀 于是我又分別測試了一下mapper和service 又說報(bào)

    2024年02月04日
    瀏覽(79)
  • 異常:org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name

    出現(xiàn)這種異常主要是無法創(chuàng)建bean到容器中,主要有以下幾種情況: 1.注解沒有添加: controller: 注: controller類要加入@RestController注解,@AllArgsConstructor注解視情況而定。 引入了private final IEnterpriseService service,所以需要注入,可以在controller類上加入@AllArgsConstrctor注解修飾。

    2024年02月21日
    瀏覽(20)
  • Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean wit

    是因?yàn)闆]有掃描到 mapper,在啟動(dòng)類或者配置類中@MapperScan配置包掃描,或者使用@Mapper注解Mapper接口

    2024年02月16日
    瀏覽(32)
  • 解決報(bào)錯(cuò):@org.springframework.beans.factory.annotation.Autowired(required=true)

    先把問題貼出來: @org.springframework.beans.factory.annotation.Autowired(required=true) 報(bào)這個(gè)錯(cuò)是因?yàn)椋?@Autowired(required=true):當(dāng)使用@Autowired注解的時(shí)候,其實(shí)默認(rèn)就是@Autowired(required=true),表示注入的時(shí)候,該bean必須存在,否則就會(huì)注入失敗。 ** ** 解決辦法:

    2024年02月13日
    瀏覽(21)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包