ORM模型简介
ORM :对象关系映射( Object Relation Mapping)
Object对象指的是Java程序中的实体类对象
Relation关系指的是数据库中的表
Mapping映射指的是Java中的实体类对象和数据库中表的数据的对应关系

GitHub:https://github.com/mybatis/mybatis-3
在intellij IDEA中新建Module→maven→next→配置好信息
在新建的maven中的pom.xml中添加需要的maven

此时再查看External Libraries会发现驱动已经加载进来了。(网址:类库地址:http://mvnrepository.com/)

在resources中配置相应的xml

在resources/mapper中配置数据库表相应的xml,名字通常为表名+Mapper

在项目中的使用方法



网友评论