一.Spring Boot环境搭建
1.新建maven工程
2.添加依赖
在pom文件中添加:
(1). spring-boot-starter-parent:可以使用spring boot框架
< !-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent -->
< dependency>
< groupId>org.springframework.boot
< artifactId>spring-boot-starter-parent
< version>2.6.4
< type>pom
< /dependency>
(2). spring-boot-starter-web:可以开发web项目
< !-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
< dependency>
< groupId>org.springframework.boot
< artifactId>spring-boot-starter-web
< version>2.6.4
< /dependency>
3.按照src-main-java-com.software-TestMyBatis.jav创建包,添加启动类 TestMyBatis.java,代码为:
@SpringBootApplication
public class TestMybBatis {
Spring Boot + MyBatis环境搭建
最新推荐文章于 2023-07-07 14:31:03 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)