Failed to bind properties under ‘mybatis.configuration(亲测好用!)

springboot项目创建常见问题https://blog.csdn.net/libusi001/article/details/97267365

一、报错信息

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-10-22 15:18:06.597 ERROR 14268 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Failed to bind properties under 'mybatis.configuration.mapped-statements[0].parameter-map.parameter-mappings[0]' to org.apache.ibatis.mapping.ParameterMapping:

    Reason: Failed to extract parameter names for org.apache.ibatis.mapping.ParameterMapping(org.apache.ibatis.mapping.ParameterMapping$1)

Action:

Update your application's configuration
启动ApplicationContext时出错。 要显示条件报告,请在启用“调试”的情况下重新运行您的应用程序。
2019-10-22 15:18:06.597错误14268 --- [main] o.s.b.d.LoggingFailureAnalysisReporter:

****************************
申请开始失败
****************************

描述:

无法将“ mybatis.configuration.mapped-statements [0] .parameter-map.parameter-mappings [0]”下的属性绑定到org.apache.ibatis.mapping.ParameterMapping:

     原因:无法为org.apache.ibatis.mapping.ParameterMapping(org.apache.ibatis.mapping.ParameterMapping $ 1)提取参数名称。

行动:

更新您的应用程序的配置

二、修改Springboot相关pom引用

  1. 创建Springboot时,是通过https://start.spring.io/在配置过后在服务器生成并下载到本地解压的
  2. 所以其自动配置的相关组件的版本都是很新的
  3. 然后通过跟其他正常项目对比,发现jar包引用版本过高
  4. 尝试降低版本,解决问题!

spring-boot-starter-parent:

 <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.0.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

降低jar引用Version:

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.5.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

mybatis-spring-boot-starter:

 <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>2.1.0</version>
        </dependency>

降低jar引用Version:

<dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>2.0.1</version>
        </dependency>

有用请点赞,养成良好习惯!

疑问、交流、鼓励请留言!

 

评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

慕白Lee

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值