# dlxz-spring-boot-helloworld **Repository Path**: ntpu/dlxz-spring-boot-helloworld ## Basic Information - **Project Name**: dlxz-spring-boot-helloworld - **Description**: springboot helloworld project - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-05-27 - **Last Updated**: 2023-05-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: 练习, SpringBoot ## README # dlxz-spring-boot-demo-helloworld # 简介 SpringBoot HelloWorld 练习 pom.xml ```xml org.springframework.boot spring-boot-starter-web ``` 主要的依赖,除了 parent 是 springboot 的父项目之外,其次就是 spring web 这个依赖。 main.java ```java import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @SpringBootApplication @RestController public class DlxzSpringBootDemoHelloworldApplication { public static void main(String[] args) { SpringApplication.run(DlxzSpringBootDemoHelloworldApplication.class, args); } @GetMapping("/hello") public String hello() { return "Hello,World!"; } } ``` 启动启动类之后,在浏览器中访问该接口,即可看到效果了。