
mybatis
小POooo
永不退缩
展开
-
【ORACLE】数据库表数据误删恢复
1. 表恢复对误删的表,只要没有使用 purge 永久删除选项,那么基本上是能从 flashback table 区恢复回来的。数据表和其中的数据都是可以恢复回来的,记得 flashback table 是从 Oralce 10g 提供的,一般步骤有:a.从 flashback table 里查询被删除的数据表select * from recyclebin order by dropti...原创 2019-11-29 12:55:24 · 343 阅读 · 0 评论 -
Mybatis的jar包下载
mybatis的jar包下载地址:https://github.com/mybatis/mybatis-3/releasesmybatis和Spring整合jar包下载地址:https://github.com/mybatis/spring/releases原创 2018-05-07 18:36:26 · 3627 阅读 · 0 评论 -
Mybatis中的config.dtd约束的位置
1、mybatis-3.4.1.jar2、org.apache.ibatis.builder.xml3、mybatis-3-config.dtd原创 2018-05-07 19:11:44 · 688 阅读 · 0 评论 -
Error creating bean with name 'dataSource' defined in class path resource [applicationContext.xml]:
Error creating bean with name 'dataSource' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is javax.naming.NoInitialContextException:这个错误是你在加载s...原创 2018-06-11 21:09:39 · 835 阅读 · 0 评论 -
generatorConfig.xml mybatis逆向工程
对于一个字段太多的表,如果一个一个的去写 mapper和pojo太累还容易出错,可用mybatis的工具处理这些事情 官方网址: http://www.mybatis.org/generator/configreference/xmlconfig.html转自:https://blog.youkuaiyun.com/wangxy799/article/details/60870361 pom添加插件&l...转载 2018-06-12 20:56:27 · 1383 阅读 · 0 评论 -
解决org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)错误
错误提示: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)1一般的原因 Mapper interface和xml文件的定义对应不上,需要检查包名,namespace,函数名称等能否对应上。 按以下步骤一一执行: 1、检查xml文件所在的package名称是否和interface对应的pa...转载 2018-06-08 21:59:15 · 463 阅读 · 0 评论 -
mybatis 框架 resultMap 的延迟加载功能的实现
为什么需要延迟加载? 在我们的实际开发中,如果单表查询能满足业务需求。尽量用单表查询,因为单表查询的效率比多表关联查询快。那么当业务需求需要用到多表查询,我们应该怎么办呢?Mybatis 引入了延迟加载的概念。什么叫延迟加载? 为了满足业务需求,必须进行多表查询时,可以先进行单表查询 ,在业务信息中需要用到关联表信息的时候,再进行关联表的单表查询。resultMap可以实现高级映射(使用assoc...原创 2018-06-10 13:12:02 · 508 阅读 · 0 评论 -
mybatis逆向工程
GeneratorSqlmap自动生成mybatis映射文件和domian实体类1.主程序中加载main方法,通过main方法生成实体类以及映射文件public class GeneratorSqlmap { public void generator() throws Exception{ List warnings = new ArrayList(); ...原创 2018-06-18 12:55:39 · 172 阅读 · 0 评论 -
The content of element type "collection" must match "(constructor?,id*,result*,association*,collecti
MyBatis规定的顺序,要按照规则来写,显示id,然后是result,然后association,最后是collection,这个是在写映射文件的时候没有把他们的顺序写对,应该调整一下顺序就可以成功了, 调整完association和collection的位置顺序就可以了 ...原创 2018-09-12 10:34:55 · 507 阅读 · 0 评论