ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## 快速入门 ~~~ <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <!--所有的springboot工程都必须继承spring-boot-starter-parent--> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.1.RELEASE</version> </parent> <groupId>com.like</groupId> <artifactId>spring_boot1</artifactId> <version>1.0-SNAPSHOT</version> <dependencies> <!--web功能起步依赖--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> </dependencies> </project> ~~~ ## 引导类 ~~~ package com.like; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; //声明该类是一个springboot引导类 @SpringBootApplication public class MySpringBootApplication { //main是Java程序入口 public static void main(String[] args) { //run方法表示运输型springboot的引导类,run参数就是springboot引导类的字节码对象 SpringApplication.run(MySpringBootApplication.class); } } ~~~ ## SpringBoot热部署 ~~~ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> </dependency> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <!-- 没有该配置,devtools 不生效 --> <fork>true</fork> <addResources>true</addResources> </configuration> </plugin> </plugins> </build> ~~~ ![](https://box.kancloud.cn/9313f9fc0e68cfa16d7396851fa77aa7_2212x1402.png) shift + option + command + / ![](https://box.kancloud.cn/438ba2473c7c54a5c43e7ac70bbd1b5b_1826x1380.png)