springBoot 就是spring4.0框架以后的一个延伸,它使我们的开发更加简单,
特点:增加了不少注解,不用配置Tomcat,springBoot自带,基于你的maven进行开发,
springBoot项目 组成部分 1:必须支持maven环境。
src》main》java代码
resources用来配置资源环境。
test是代表测试环境
pom.xml是引入相关的jar包
main 就是我们(程序的入口)
application.properties 也就相当于springAplicationContext.xml文件
application.properties
student.sid=1
student.sname=xyc
student.spwd=123456
application.yml
student :
sid: 111
sname: xycc
spwd: xx (优先级逐步降低)
Student.properties
student.sid=1
student.sname=xyc
student.spwd=123456
注解方式 不用getset方法 在private上写@Value("${student.sid}")