欢迎光临散文网 会员登陆 & 注册

SpringBoot快速体验

2020-03-21 10:30 作者:架构风清扬-趣学旅程  | 我要投稿

1,什么是SpringBoot

Spring Boot是由Pivotal团队提供的全新框架,其设计目的是用来简化新Spring应用的初始搭建以及开发过程。
简化搭建Spring项目的流程
提供统一的父类工程,管理常见的第三方组件

官网:

https://spring.io/projects/spring-boot/

2,快速搭建一个SpringBoot项目

3,配置统一的SpringBoot父工程版本


4,引入关键的web依赖,用于开发web项目


5,引入关键的dev依赖,用于实现热部署


注意:idea还需要额外做两个设置

打开自动编译: File -> Settings -> Build,Execution,Deployment->Compiler下, 打开Build project automatically选项 
打开运行时编译: 按快捷键 Shift+Ctrl+Alt+/ ,选择 Registr 打开 compiler.automake.allow.when.app.running选项

6,配置application.properpties


通过@Value获取属性文件的值


接收日期,并返回



SpringBoot快速体验的评论 (共 条)

分享到微博请遵守国家法律