1、application.properties配置文件的配置,如下图所示:
2.源代码如下所示:
server.port=9090 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/test1?serverTimezone=GMT%2b8 spring.datasource.username=zs spring.datasource.password=123456789