1.idea创建SpringBoot项目
2.application.properties数据源配置
spring.datasource.url=jdbc:mysql://localhost:3306/lego?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8 spring.datasource.username=root spring.datasource.password=123456 spring.datasource.driver-class-name=com.mysql.jdbc.Driver spring.jpa.database=MYSQL