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

警告: Exception encountered during context initialization - cancelling refresh attempt: org.springfram

這篇具有很好參考價(jià)值的文章主要介紹了警告: Exception encountered during context initialization - cancelling refresh attempt: org.springfram。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

org.springframework.context.support.AbstractApplicationContext refresh
警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accountService': Unsatisfied dependency expressed through field 'accountMapper': Error creating bean with name 'org.mybatis.spring.SqlSessionFactoryBean#0': Lookup method resolution failed

出現(xiàn)這個(gè)異常,大部分原因是因?yàn)閖ar包的版本問題導(dǎo)致的,如果你是參考別人的代碼進(jìn)行配置的jar包,導(dǎo)入同樣的依賴版本也會(huì)出現(xiàn)這個(gè)問題

使用百度翻譯一下:

org.springframework.context支持。AbstractApplicationContext刷新
警告: 上下文初始化期間遇到異常-取消刷新嘗試:org.springframework.beans.factory。UnsatisfiedDependencyException:創(chuàng)建名為“accountService”的bean時(shí)出錯(cuò):通過字段“accountMapper”表示的依賴關(guān)系不滿意:創(chuàng)建名為”org.mybatis.spring“的bean時(shí)發(fā)生錯(cuò)誤。SqlSessionFactoryBean#0”:查找方法解析失敗

翻譯解析

根據(jù)上面的翻譯我們可以判斷出來(lái),是依賴關(guān)系的問題,通過使用必應(yīng)的搜索,搜到了兩篇文章關(guān)于這個(gè)問題的解決,大部分說(shuō)的是依賴問題,主要是mybatis-spring依賴

問題復(fù)刻

<dependency>
      <groupId>org.mybatis</groupId>
      <artifactId>mybatis</artifactId>
      <version>3.5.10</version>
      <!--2022 年 5 月 23 日-->
    </dependency>
    <dependency>
      <groupId>org.mybatis</groupId>
      <artifactId>mybatis-spring</artifactId>
      <version>2.0.7</version>
      <!--	2022 年 1 月 29 日-->
    </dependency>

通過上面的代碼塊可以看出來(lái),mybatis-spring的版本是2.0.7對(duì)比3.5.10的版本差了一個(gè)版本,通過maven倉(cāng)庫(kù)可以看到mybatis-spring已經(jīng)有3.0.0的版本了我們換上最新版本就可以了

<dependency>
    <groupId>org.mybatis</groupId>
    <artifactId>mybatis-spring</artifactId>
    <version>3.0.0</version>
</dependency>

解決方法

就是把mybatis-spring依賴換成最新版本的就行了

參考
鏈接A
鏈接B文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-559330.html

到了這里,關(guān)于警告: Exception encountered during context initialization - cancelling refresh attempt: org.springfram的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(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)文章

  • 已解決:Unexpected exception during bean creation; nested exception is java.lang.IllegalStateException:

    已解決:Unexpected exception during bean creation; nested exception is java.lang.IllegalStateException:

    這個(gè)異常通常是由于在使用 Spring Cloud Feign 客戶端進(jìn)行負(fù)載均衡時(shí)缺少相關(guān)的依賴引起的。具體來(lái)說(shuō),它提示你忘記在項(xiàng)目的依賴中包含? spring-cloud-starter-loadbalancer 。 spring-cloud-starter-loadbalancer ?是用于支持負(fù)載均衡功能的 Spring Cloud Starter 組件之一。它提供了負(fù)責(zé)將請(qǐng)求分發(fā)

    2024年02月08日
    瀏覽(26)
  • 【Eclipse】Error occurred during initialization of boot layer.報(bào)錯(cuò)解決方法

    【Eclipse】Error occurred during initialization of boot layer.報(bào)錯(cuò)解決方法

    個(gè)人記錄日志: 根本原因:Java9相較于Java8(JDK8、JDK1.8)引進(jìn)了模塊,此時(shí)無(wú)法進(jìn)行單獨(dú)的類。 (在Java8和更早的應(yīng)用程序中,頂級(jí)組件是包? package ?。它將一組相關(guān)類型放入一個(gè)組中。它還包含一組資源。 java9應(yīng)用程序與java8沒有太大區(qū)別;它引入了一個(gè)新組件? module ?,

    2024年02月01日
    瀏覽(19)
  • Spring-boot context.initializer.classes 配置的使用

    在Spring Boot中, context.initializer.classes 是一個(gè)屬性,允許你在 application.properties 或 application.yml 配置文件中指定一個(gè)或多個(gè)實(shí)現(xiàn) ApplicationContextInitializer 接口的類。這些類可以在Spring應(yīng)用上下文初始化之前執(zhí)行一些自定義的初始化邏輯。 以下是一個(gè)使用 context.initializer.classes 屬性

    2024年04月11日
    瀏覽(23)
  • 異常Exception in thread “main“ feign.FeignException$InternalServerError: [500] during [POST] to [http:

    異常Exception in thread “main“ feign.FeignException$InternalServerError: [500] during [POST] to [http:

    最近在一個(gè)微服務(wù)練習(xí)項(xiàng)目中出現(xiàn)以下異常 Exception in thread \\\"main\\\" feign.FeignException$InternalServerError: [500] during [POST] to [http://trip-article-server/strategies/statisDataInit] [IStrategyFeginService#statisDataInits()]: [{\\\"timestamp\\\":\\\"2023-09-19T12:47:42.749+00:00\\\",\\\"status\\\":500,\\\"error\\\":\\\"Internal Server Error\\\",\\\"message\\\":\\\"\\\",\\\"path\\\":\\\"

    2024年03月19日
    瀏覽(19)
  • Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap

    Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap

    在啟動(dòng)elasticsearch.bat時(shí)會(huì)直接閃退,大概率是因?yàn)閮?nèi)存分配不足導(dǎo)致直接打不開elasticsearch。 于是我直接在終端運(yùn)行,想看問題出在哪,此時(shí)報(bào)錯(cuò)如題所示 找到elasticsearch文件夾下config子文件夾,打開找到 jvm.options ,對(duì)內(nèi)存分配進(jìn)行調(diào)整 使用記事本或者Notepad++打開,如圖: 這

    2024年02月07日
    瀏覽(23)
  • IDEA雙擊打不開,Error opening zip file or JAR manifest missing ,Error occurred during initialization問題分析

    IDEA雙擊打不開,Error opening zip file or JAR manifest missing ,Error occurred during initialization問題分析

    有次我感覺我的IDEA有些許卡頓,于是我修改了我的IDEA內(nèi)存配置(修改方式)在我修改完后,發(fā)現(xiàn)雙擊我的IDEA打不開了,這把我嚇壞了,別人給出的方案是去C盤下找到 idea64.exe.vmoptions文件 ,將配置改到之前的數(shù)值,我在C盤里確實(shí)也找到了IDEA的文件夾,但是沒有這個(gè)文件,情

    2024年02月07日
    瀏覽(28)
  • [Labtools 27-3733] Error during cs_server initialization: Failed to connect cs_server at TCP:localho

    記錄遇到過的問題: [Labtools 27-3733] Error during cs_server initialization: Failed to connect cs_server at TCP:localhost:3042 to hw_server at TCP:localhost:3121. 燒錄程序時(shí),打開硬件目標(biāo)找不到JTAG。 (此鏈接可見詳情)xilinx vivado 2019 驅(qū)動(dòng)問題,Connecting to hw_server url TCP:localhost:3121,jtag連接不上 | 碼農(nóng)家園

    2024年02月02日
    瀏覽(22)
  • Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyExc

    Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyExc

    Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name ‘org.apache.shiro.spring.config.web.autoconfigure.ShiroWebFilterConfiguration’: Unsatisfied dependency expressed through field ‘filterMap’; nested exception is org.springframework.beans.factory.BeanCreatio

    2024年02月07日
    瀏覽(25)
  • spark grpc 在master運(yùn)行報(bào)錯(cuò) exitcode13 User did not initialize spark context

    ApplicationMaster: Final app status: FAILED, exitCode: 13, (reason: Uncaught exception: java.lang.IllegalStateException: User did not initialize spark context! 1.使用了不具備權(quán)限的用戶,spark運(yùn)行環(huán)境有缺失 2.protobuf 需要使用指定操作系統(tǒng)進(jìn)行編譯 未使用 os.detected.classifier=windows-x86_64 或 linux-x86_64,或者把windo

    2024年02月10日
    瀏覽(19)
  • Unable to start web server; nested exception is org.springframework.context.ApplicationContextExcept

    Unable to start web server; nested exception is org.springframework.context.ApplicationContextExcept

    SpringBoot項(xiàng)目啟動(dòng)報(bào)錯(cuò),如圖 Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.這個(gè)錯(cuò)誤 可以看出ServletWebServerFactory在sping容器啟動(dòng)時(shí)沒有將其注冊(cè)進(jìn)去,缺少相關(guān)依賴。沒有

    2024年02月14日
    瀏覽(20)

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

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

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

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

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包