java连接本地数据库可以简写为///

java连接数据库配置文件写为:

server:
  port: 8091
spring:
  application:
    name: user-manager
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://localhost:3306/user?serverTimezone=Asia/Shanghai&characterEncoding=utf-8
    username: root
    password: root

url配置本地连接可以简写为

server:
  port: 8091
spring:
  application:
    name: user-manager
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql:///user?serverTimezone=Asia/Shanghai&characterEncoding=utf-8
    username: root
    password: root

你可能感兴趣的:(java,数据库,开发语言,mysql)