package tech.pdai.springboot.helloworld.docker;
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-docker.rar
共4个文件
yml:1个
xml:1个
java:1个
需积分: 0 0 下载量 81 浏览量
2023-03-07
17:16:41
上传
评论
收藏 3KB RAR 举报
温馨提示
SringBoot的概述# SpringBoot解决上述Spring的缺点SpringBoot对上述Spring的缺点进行的改善和优化,基于约定优于配置的思想,可以让开发人员不必在配置与逻辑业务之间进行思维的切换,全身心的投入到逻辑业务的代码编写中,从而大大提高了开发的效率,一定程度上缩短了项目周期。# SpringBoot的特点为基于Spring的开发提供更快的入门体验开箱即用,没有代码生成,也无需XML配置。同时也可以修改默认值来满足特定的需求提供了一些大型项目中常见的非功能性特性,如嵌入式服务器、安全、指标,健康检测、外部配置等SpringBoot不是对Spring功能上的增强,而是提供了一种快速使用Spring的方式# SpringBoot的核心功能起步依赖 起步依赖本质上是一个Maven项目对象模型(Project Object Model,POM),定义了对其他库的传递依赖,这些东西加在一起即支持某项功能。简单的说,起步依赖就是将具备某种功能的坐标打包到一起,并提供一些默认的功能。自动配置Spring Boot的自动配置是一个运行时(更准确地说,是应用程序启动时)的过程,考
资源推荐
资源详情
资源评论
收起资源包目录
107-springboot-demo-helloworld-docker.rar (4个子文件)
107-springboot-demo-helloworld-docker
pom.xml 3KB
src
main
resources
application.yml 21B
java
tech
pdai
springboot
helloworld
docker
SpringBootHelloWorldApplication.java 903B
Dockerfile 150B
共 4 条
- 1
资源评论
毕设王同学
- 粉丝: 120
- 资源: 1193
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功