标签:地址 control 构建 start.s img style stc mapping ota
a. 地址:http://start.spring.io/
b. 填写Group、Artifact
c. 生成工程、下载、解压
package com.jihite.helloworld.controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class HelloController { @RequestMapping("/hello") public String index() { return "Hello World~"; } }
<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> </dependency> </dependencies>
请求:http://localhost:8080/hello
返回:Hello World~
标签:地址 control 构建 start.s img style stc mapping ota
原文地址:https://www.cnblogs.com/kaituorensheng/p/9226717.html