1 > 新建项目勾选三个选项
2 > 右侧Database选项 -> +
3 > Data source -> MySql
4 > 填写Data Sources and Drivers
URL填写格式
jdbc:mysql://ip:端口号/库名?useUnicode=true&serverTimezone=GMT%2b8
例:jdbc:mysql://***.60.44.11:3306/user?useUnicode=true&serverTimezone=GMT%2b8
5 > Test Connection -> Apply -> ok
6 > 更改application.properties文件
#根据自己的需要修改
spring.datasource.url=jdbc:mysql://***.60.44.11:3306/hubiaotest?useUnicode=true&serverTimezone=GMT%2b8
spring.datasource.username=root
spring.datasource.password=*****
#复制粘贴
#tomac编码
server.tomcat.uri-encoding=utf-8
mybatis.mapper-locations=classpath:mapper/*.xml
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.properties.hibernate.hbm2ddl.auto=update
spring.datasource.hikari.max-lifetime=30000
spring.profiles.active=dev
time=30000
spring.profiles.active=dev