spring boot 集成 mybatis Parameter '0' not found

这个问题是 因为 mybatis 版本问题 目前我使用的 mybatis-spring-boot-starter 是1.3.2的  里面 包含 mybatis 是3.4.6的。

mybatis版本

3.4.6的版本 mybatis 不支持 #{0}的这种写法。

快速解决这个问题的两个办法:

1  把xml中的#{0}这种写法 改成 #{arg0} 这种。

2  把mybatis-spring-boot-starter 降低版本  (不知道单独降低这一个版本 会不会有什么其他副作用)

我目前是 把 mybatis-spring-boot-starter 从1.3.2 降低到了 1.1.1  (因为双十一要到了。。)

发现降低了之后 ,里面包括的mybatis降低到了3.4.0

猜你喜欢

转载自blog.csdn.net/QAQ_666666/article/details/83750917
今日推荐