Springboot使用入门
目录
1.新建一个maven空项目
2.导入依赖
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.3.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
3.编写自己的Application类
@SpringBootApplication
public class MyApplication {
public static void main(String[] args){
SpringApplication.run(MyApplication.class,args);
}
}
写到这里一个最简单的Springboot就可以启动了