1.创建项目
1.1 创建SpringBoot项目
打开Files->New->Project,可以直接通过Spring Initializr创建项目,包名等可以根据自己喜好修改,不过至少要勾选Spring Web这一个依赖;也可以新建一个Maven项目,然后在pom.xml文件中写入相关的依赖。
1.2 配置文件及Java代码
在pom.xml中写入相关配置
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">
4.0.0
com.xmtorrent
spring-boot-01-helloworld
1.0-SNAPSHOT
org.springframework.boot
spring-boot-starter-parent
1.5.9.RELEASE
UTF-8