赞
踩
目录
- <parent>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-parent</artifactId>
- <version>2.6.7</version>
- <relativePath/>
- </parent>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
- @RestController
- public class HelloController {
-
- @GetMapping("/hello")
- public String hello() {
- return "Hello, Spring Boot!";
- }
- }
- server:
- port: 8888
访问地址:http://127.0.0.1:8888/hello
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。