
java
张啸zx
前端小师
展开
-
mybatis查询出来的字段都为null
数据库字段和xml中的字段要对应 xml: 数据库:原创 2019-03-11 19:18:06 · 2245 阅读 · 0 评论 -
Invalid bound statement (not found)
这个问题是出现在springboot 集成 mybatis时候常见的问题; 参考网上的解决方案 MyBatis绑定错误 1、检查xml文件所在的package名称是否和interface对应的package名称一一对应 2、检查xml文件的namespace是否和xml文件的package名称一一对应 3、检查函数名称能否对应上 4、去掉xml文件中的中文注释 5、随意在xml文件中加一个空格或者...原创 2019-03-12 12:34:45 · 1374 阅读 · 0 评论 -
springboot集成mybatis
1.通过maven创建springboot项目 首先访问 https://start.spring.io/ 快速生成项目(可以选择maven或者gradle) 点击 generate 下载压缩包,导入到IDE 如下图 添加controller到 包 com.example.ddd.controller springboot 会扫描该包下的controller 最后启动主程序就可以启动这个sp...原创 2019-03-12 16:31:15 · 156 阅读 · 0 评论