MyBatis入门程序

本人独立博客:https://chenjiabing666.github.io/

设计案例

实现向tedu_ums数据库的t_users数据表中插入数据。

开发步骤

1 创建项目DAY07-MyBatis-Sample,生成web.xml,在web.xml中配置(2项),添加spring-webmvc依赖,复制Spring配置文件,添加Tomcat运行环境;

2 添加新的依赖:mybatis、mybatis-spring、spring-jdbc:

<!-- Spring-JDBC --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>3.2.8.RELEASE</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.4.6</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>1.3.2</version> </dependency>

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wpjpwx.html