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
便可建立配置完成。下一篇講述由數據庫自動生成文件。