1、什么是spring boot?mysql
Spring Boot是由Pivotal团队提供的全新框架,其设计目的是用来简化新Spring应用的初始搭建以及开发过程。该框架使用了特定的方式来进行配置,从而使开发人员再也不须要定义样板化的配置。经过这种方式,Spring Boot致力于在蓬勃发展的快速应用开发领域(rapid application development)成为领导者。(网上自行搜索,一大堆)web
2、如何建立一个spring boot工程spring
打开IDEA——File——New——Projectsql
选择spring Initializr,点击Next;数据库
选择对应的,点击Next;api
选择对应的,Next;mybatis
Finish;app
进行配置properties:在/src/main/resource/下的properties文件。框架
(注意数据库的访问端口号)url
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/goods?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT spring.datasource.username=root spring.datasource.password=123456 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver #mybatis.config-location配置 #mybatis-config.xml配置文件 #mybatis.config-location=classpath:mybatis/mybatis-config.xml #mybatis.mapper-locations=classpath*:/mapper/*.xml mybatis.mapper-locations=classpath*:/com/**/dao/mapper/*.xml mybatis.type-aliases-package=com.example.specialgoods.webtest.model #jpa集成配置 spring.jpa.properties.auto = update spring.jpa.properties.dialect = org.hibernate.dialect.PostgreSQLDialect spring.jpa.properties.use_jdbc_metadata_defaults = false spring.jpa.properties.show-sql = true
便可建立配置完成。下一篇讲述由数据库自动生成文件。