SpringDataJpa设置数据库引擎为InnoDB

jpa 创建数据库的时候默认会使用engine=MyISAM,如果想使用InnoDB

spring:
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    username: root
    password: root
    url: jdbc:mysql://localhost/springboot-learning?characterEncoding=utf-8&useSSL=false
  jpa:
    show-sql: true
    hibernate:
      ddl-auto: update
    database-platform: org.hibernate.dialect.MySQL5InnoDBDialect

你可能感兴趣的:(SpringDataJpa设置数据库引擎为InnoDB)