亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

SpringBoot3匹配Mybatis3的錯(cuò)誤與解決方案

 更新時(shí)間:2025年08月16日 10:25:32   作者:RR1335  
文章指出SpringBoot3與MyBatis3兼容性問題,因未更新MyBatis-Plus依賴至SpringBoot3專用坐標(biāo),導(dǎo)致類沖突,解決方案是替換pom中的依賴為`mybatis-plus-spring-boot3-starter:3.5.12`,并排除舊版本核心庫(kù),確保版本一致性

SpringBoot3匹配Mybatis3的錯(cuò)誤與解決

mybatis-plus在pom文件中的出錯(cuò)

提到了 pom 文件的錯(cuò)誤。

mybatis在SpringBoot3

提供了一個(gè)新的 坐標(biāo):

<!-- https://mvnrepository.com/artifact/com.baomidou/mybatis-plus-spring-boot3-starter -->
<dependency>
    <groupId>com.baomidou</groupId>
    <artifactId>mybatis-plus-spring-boot3-starter</artifactId>
    <version>3.5.12</version>
</dependency>

如果沒有個(gè)更新到新坐標(biāo)

一樣會(huì)出錯(cuò)。

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'compatibleSet' for bean class [com.baomidou.mybatisplus.extension.spi.CompatibleSet] conflicts with existing, non-compatible bean definition of same name and class [com.baomidou.mybatisplus.core.spi.CompatibleSet]


org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'compatibleSet' for bean class [com.baomidou.mybatisplus.extension.spi.CompatibleSet] conflicts with existing, non-compatible bean definition of same name and class [com.baomidou.mybatisplus.core.spi.CompatibleSet]
    at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.checkCandidate(ClassPathBeanDefinitionScanner.java:361) ~[spring-context-6.2.8.jar:6.2.8]
    at org.mybatis.spring.mapper.ClassPathMapperScanner.checkCandidate(ClassPathMapperScanner.java:322) ~[mybatis-spring-2.1.2.jar:2.1.2]
    at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:288) ~[spring-context-6.2.8.jar:6.2.8]
    at org.mybatis.spring.mapper.ClassPathMapperScanner.doScan(ClassPathMapperScanner.java:209) ~[mybatis-spring-2.1.2.jar:2.1.2]
    at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.scan(ClassPathBeanDefinitionScanner.java:255) ~[spring-context-6.2.8.jar:6.2.8]
    at org.mybatis.spring.mapper.MapperScannerConfigurer.postProcessBeanDefinitionRegistry(MapperScannerConfigurer.java:381) ~[mybatis-spring-2.1.2.jar:2.1.2]
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:349) ~[spring-context-6.2.8.jar:6.2.8]
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:148) ~[spring-context-6.2.8.jar:6.2.8]
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:791) ~[spring-context-6.2.8.jar:6.2.8]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:609) ~[spring-context-6.2.8.jar:6.2.8]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.5.3.jar:3.5.3]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) ~[spring-boot-3.5.3.jar:3.5.3]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439) ~[spring-boot-3.5.3.jar:3.5.3]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:318) ~[spring-boot-3.5.3.jar:3.5.3]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1361) ~[spring-boot-3.5.3.jar:3.5.3]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1350) ~[spring-boot-3.5.3.jar:3.5.3]
    at com.wucaimu.WuCaiMuApplicationStart.main(WuCaiMuApplicationStart.java:19) ~[classes/:na]

總結(jié)

以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

  • java.text.DecimalFormat用法詳解

    java.text.DecimalFormat用法詳解

    這篇文章主要為大家詳細(xì)介紹了java.text.DecimalFormat用法,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2018-03-03
  • 從dubbo源碼分析qos-server端口沖突問題及解決

    從dubbo源碼分析qos-server端口沖突問題及解決

    這篇文章主要介紹了從dubbo源碼分析qos-server端口沖突問題及解決方案,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2023-02-02
  • Java原子類中的AtomicInteger類詳解

    Java原子類中的AtomicInteger類詳解

    這篇文章主要介紹了Java原子類中的AtomicInteger類詳解,原子類可以保證對(duì)"變量"操作的,原子性、有序性、可見性,我們可以通過AtomicInteger類,來看看它們是怎樣工作的,需要的朋友可以參考下
    2023-10-10
  • SpringAOP中的通知Advice解析

    SpringAOP中的通知Advice解析

    這篇文章主要介紹了SpringAOP中的通知Advice解析,AOP 中的通知是基于連接點(diǎn)業(yè)務(wù)邏輯的一種增強(qiáng),Spring AOP 可以基于 XML 方式和基于注解方式定義,只是寫法不同,這里只使用注解的方式來講解通知的詳細(xì)用法,需要的朋友可以參考下
    2023-09-09
  • 如何通過Kaptcha在Web頁面生成驗(yàn)證碼

    如何通過Kaptcha在Web頁面生成驗(yàn)證碼

    這篇文章主要介紹了如何通過Kaptcha在Web頁面生成驗(yàn)證碼,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下
    2020-10-10
  • Mybatis模糊查詢及自動(dòng)映射實(shí)現(xiàn)詳解

    Mybatis模糊查詢及自動(dòng)映射實(shí)現(xiàn)詳解

    這篇文章主要介紹了Mybatis模糊查詢及自動(dòng)映射實(shí)現(xiàn)詳解,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下
    2020-02-02
  • 解決rocketmq-client日志保存路徑的問題

    解決rocketmq-client日志保存路徑的問題

    這篇文章主要介紹了解決rocketmq-client日志保存路徑的問題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2021-07-07
  • java設(shè)計(jì)模式之裝飾器模式(Decorator)

    java設(shè)計(jì)模式之裝飾器模式(Decorator)

    這篇文章主要為大家詳細(xì)介紹了java設(shè)計(jì)模式之裝飾器模式Decorator,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2017-01-01
  • 詳解關(guān)于IntelliJ IDEA中Schedule for Addition 的問題

    詳解關(guān)于IntelliJ IDEA中Schedule for Addition 的問題

    本篇文章主要介紹了詳解關(guān)于 IntelliJ IDEA 中 Schedule for Addition 的問題,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2017-12-12
  • Spring Boot ActiveMQ如何設(shè)置訪問密碼

    Spring Boot ActiveMQ如何設(shè)置訪問密碼

    這篇文章主要介紹了Spring Boot ActiveMQ如何設(shè)置訪問密碼,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下
    2020-07-07

最新評(píng)論