spring boot JPA 的yml 配置(mysql)

server:
  port: 8888

spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    username: root
    password: root
    url: jdbc:mysql://localhost:3306/testspringboottwo?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
  jpa:
    hibernate:
      ddl-auto: validate
      database: mysql
    database-platform: org.hibernate.dialect.MySQLDialect
    show-sql: true

你可能感兴趣的:(笔记,mysql,jpa)