SpringBoot入门demo
创建脚手架,这是入门demo一个框架
然后next
创建好后在pom.xml中导入依赖
<java.version>1.8</java.version>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
我们会看到出现
一个写好的demoapplication 这个是启动测试选项 在创建controller类写我们想要的内容
写完后我们启动demoapplication
直接在网页上输入localhost:xxxx 加上controller写的url
这就完成了一个springboot脚手架的入门案例demo