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

版权声明:本文为qq_25438391原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。