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引用
- 创建Springboot时,是通过https://start.spring.io/在配置过后在服务器生成并下载到本地解压的
- 所以其自动配置的相关组件的版本都是很新的
- 然后通过跟其他正常项目对比,发现jar包引用版本过高
- 尝试降低版本,解决问题!
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>
有用请点赞,养成良好习惯!
疑问、交流、鼓励请留言!