package tech.pdai.springboot.helloworld;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author pdai
*/
@SpringBootApplication
@RestController
public class SpringBootHelloWorldApplication {
/**
* main interface.
*
* @param args args
*/
public static void main(String[] args) {
SpringApplication.run(SpringBootHelloWorldApplication.class, args);
}
/**
* hello world.
*
* @return hello
*/
@GetMapping("/hello")
public ResponseEntity<String> hello() {
return new ResponseEntity<>("hello world", HttpStatus.OK);
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
springboot-demo-helloworld
共4个文件
yml:1个
xml:1个
mf:1个
需积分: 12 3 下载量 122 浏览量
2023-03-01
20:36:11
上传
评论
收藏 2KB RAR 举报
温馨提示
Spring Boot 所选择的第三方库是经过考虑的,是比较适合产品开发的选择。如前文所述,SpringBoot最强大的地方在于约定大于配置,只要你引入某个模块的xx-start包,它将自动注入配置,提供了这个模块的功能;Group: 是公司或者组织的名称,是一种命名空间的概念,比如网站,那么group可以是tech.pdai。我们安装Maven Helper的插件,用来查看spring-boot-starter-web模块的依赖。核心 POM,包含自动配置支持、日志库和对 YAML 配置文件的支持。 创建 SpringBoot Web 应用 为快速进行开发,推荐你使用IDEA这类开发工具,它将大大提升你学习和开发的效率。 • 选择 Spring Initialize Spring提供的初始化项目的工具
资源推荐
资源详情
资源评论
收起资源包目录
101-springboot-demo-helloworld.rar (4个子文件)
101-springboot-demo-helloworld
pom.xml 2KB
src
main
resources
application.yml 21B
META-INF
MANIFEST.MF 105B
java
tech
pdai
springboot
helloworld
SpringBootHelloWorldApplication.java 896B
共 4 条
- 1
资源评论
毕设王同学
- 粉丝: 120
- 资源: 1193
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功