spring boot集成mybatis怎么实现自动启动tomcat

2025-02-23 18:43:35
推荐回答(1个)
回答1:

这里用到spring-boot-starter基础和spring-boot-starter-test用来做单元测试验证数据访问
引入连接mysql的必要依赖mysql-connector-java
引入整合MyBatis的核心依赖mybatis-spring-boot-starter
这里不引入spring-boot-starter-jdbc依赖,是由于mybatis-spring-boot-starter中已经包含了此依赖
123456789101112131415161718192021222324252627282930313233
org.springframework.boot spring-boot-starter-parent 1.3.2.RELEASE org.springframework.boot spring-boot-starter