![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mybatis
一年e度的夏天
这个作者很懒,什么都没留下…
展开
-
The content of element type "resultMap" must match "(constructor?,id*,result*,association*,collectio
Mybatis添加一对一关联查询的时候,就是添加association标签的时候出现这个错误。The content of element type "resultMap" must match "(constructor?,id*,result*,association*,collection*,discriminator?)".原图 查找了半天,然后发现是顺序导致了The content of原创 2015-11-20 18:50:14 · 11683 阅读 · 0 评论 -
mybatis generator怎么使用?maven使用方法介绍
一、MyBatis Generator介绍 就是一个代码生成器,可以生成model,dao,还有mapper文件,比较方便。可以去看一下官方介绍 http://mbg.cndocs.tk/index.html1、使用方法(1)、命令行不多介绍,往上有很多(2)、自写代码(3)、maven中使用我就来说一下用得比较多的maven方法 首先将mybatis-generator的一些相关配置写到原创 2016-01-08 17:15:12 · 7585 阅读 · 2 评论 -
java.lang.IllegalArgumentException: Could not resolve placeholder 'orm.mybatis.basePackage
报错如下:Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder ‘orm.mybatis.basePackage’ in string value “${orm.mybatis.basePackage}”说没有找到mybatis包 明显这里是个配置,应该是spring boot去加载mybatis的原创 2017-03-24 11:36:46 · 11092 阅读 · 0 评论 -
Mybatis中如何获取insert之后的id
其实这个很简单,但是我老是不记得,所以在这里记一下吧,免得下次忘记了又要到处瞎找。 每次我都会加入SELECT LAST_INSERT_ID() 可是这个每次都不生效。然后我就到处找为什么SELECT LAST_INSERT_ID()不生效。终于….我想起来了不扯啦,先给获取insert之后的id的办法<selectKey keyProperty="id" resultType="Integer"原创 2017-03-30 14:06:16 · 10203 阅读 · 5 评论