【发布时间】:2019-03-05 22:55:34
【问题描述】:
请问在 Spring Boot 2.0.x 中如何配置“hibernate.dialect.storage_engine = innodb”属性?
- Spring Boot 2.0.5.RELEASE
- MySQL 社区服务器 8.0.11
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 服务器变量:
default_storage_engine=InnoDB
default_tmp_storage_engine=InnoDB
Spring Boot 控制台输出:
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
【问题讨论】:
标签: mysql spring-boot innodb