springboot + jpa设置engine

springboot + 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

猜你喜欢

转载自blog.csdn.net/lizc_lizc/article/details/80301386