Springboot-HelloWorld
来源:互联网 发布:热力系统计算软件 编辑:程序博客网 时间:2024/06/05 05:42
SpringBoot是由Pivotal团队提供的全新框架,其设计目的是用来简化新Spring应用的初始搭建以及开发过程。该框架使用了特定的方式来进行配置,从而使开发人员不再需要定义样板化的配置
Springboot的特性:
1.创建独立的Spring应用程序
2.嵌入的Tomcat,无需部署WAR文件
3.简化Maven配置
4.自动配置Spring
5.提供生产就绪型功能,如指标,健康检查和外部配置
6.开箱即用,没有代码生成,也无需XML配置•为基于Spring的开发提供更快的入门体验
•开箱即用,没有代码生成,也无需XML配置。同时也可以修改默认值来满足特定的需求。
•提供了一些大型项目中常见的非功能特性,如嵌入式服务器、安全、指标,健康检测、外部配置等。
•SpringBoot并不是对Spring功能上的增强,而是提供了一种快速使用Spring的方式。
准备:JDK1.8
eclipse
maven
创建maven工程springboot-hello
打开pom文件,引入jar包
<!-- spring boot 父节点依赖,引入这个之后相关的引入就不需要添加version配置,spring boot会自动选择最合适的版本进行添加。 --><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>1.5.8.RELEASE</version></parent>java.version 指定jdk版本号:<java.version>1.8</java.version>添加spring-boot-starter-web依赖<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency>
新建一个HelloController
@RestControllerpublic class HelloController {@RequestMapping("/hello")public String hello(){return "hello";}
新建一个启动类App
public static void main(String[] args) {SpringApplication.run(App.class, args);}
run as java application 启动
看到上面的信息,证明启动成功,此时访问下http://localhost:8080/hello 就可以看到输出hello字符串
到此springboot的helloworld结束!
阅读全文
0 0
- SpringBoot-HelloWorld
- SpringBoot HelloWorld
- SpringBoot HelloWorld
- Springboot-HelloWorld
- springboot---helloworld
- Springboot 之 Helloworld
- SpringBoot入门之HelloWorld
- 2.Springboot 之 Helloworld
- SpringBoot入门之HelloWorld
- springboot之helloworld
- SpringBoot搭建HelloWorld工程
- springboot的helloworld
- SpringBoot之Helloworld
- SpringBoot学习笔记--HelloWorld
- Springboot学习一 helloworld
- SpringBoot(1)--------helloworld
- Springboot 环境搭建-helloworld
- SpringBoot学习——SpringBoot入门HelloWorld
- 使用开源PPssPP 在android环境中编译步骤
- Fiori2.0学习笔记-JSONModel
- jsp静态include和动态include的区别
- 内存泄露分析OutOfMemoryError-(Memory Analyzer Tool,MAT)
- 2017-8-21到2017-11-21
- Springboot-HelloWorld
- CString、String、Char*相互转换
- 糖油拌饭
- Python 学习过程
- Nginx访问PHP文件的File not found错误处理,两种情况
- 卷积神经网络(二)
- Cocoscreator-cc.Node
- 第一章 对象导论1
- Linux】CentOS安装solr 4.10.3