spring boot开发文档
spring boot优点
java EE开发框架的发展流程
spring-boot的优势
1.简化了大量的xml配置文件,spring-boot对java ee web开发的常用的组件做了一定的封装 |
---|
2.spring-boot创建项目时,可以实现零配置。无需和ssm框架一样,配置springmvc,配置事务等 |
3.spring-boot可以快速的上手,如果发现不适合项目也可以快速的抛弃 |
spring boot项目创建
建议开发中使用Idea开发spring-boot项目,有关idea工具的好处可以自行百度
1.idea创建spring-boot项目
2.spring-boot的目录结构
spring-boot集成jpa(hibernate实现)
##1.配置文件格式的修改
建议将spring-boot的主配置文件改为yml格式
##2.yml文件的配置
spring:
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/springboot?charsetEncoding=utf-8
username: root
password: root
jpa:
hibernate:
ddl-auto: update
show-sql: true