Spring Boot 2.0.x上的InnoDB? [英] InnoDB on Spring Boot 2.0.x?

查看:66
本文介绍了Spring Boot 2.0.x上的InnoDB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请在Spring Boot 2.0.x中如何配置"hibernate.dialect.storage_engine = innodb"属性?

How to configure the "hibernate.dialect.storage_engine = innodb" property in Spring Boot 2.0.x, please ?

  • Spring Boot 2.0.5.RELEASE
  • MySQL Community Server 8.0.11

application.properties:

application.properties:

spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.properties.hibernate.format_sql=true
spring.jpa.properties.hibernate.dialect.storage_engine=innodb
spring.jpa.show-sql=true

MySQL服务器变量:

MySQL Server Variables:

default_storage_engine=InnoDB
default_tmp_storage_engine=InnoDB

Spring Boot Console输出:

Spring Boot Console output:

Hibernate: 

    drop table if exists person
Hibernate: 

    create table person (
       id bigint not null auto_increment,
        address varchar(255),
        age integer,
        city varchar(255),
        info varchar(255),
        telephone varchar(255),
        zip_code varchar(255),
        email varchar(255) not null,
        first_name varchar(255) not null,
        last_name varchar(255) not null,
        version bigint,
        primary key (id)
    ) engine=MyISAM

推荐答案

您可以尝试以下操作:

spring.jpa.database-platform: org.hibernate.dialect.MySQL5InnoDBDialect

这篇关于Spring Boot 2.0.x上的InnoDB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆