spring boot jpa hibernate 根据实体类生成表以及字段的命名策略

无修改命名 mysql

spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl

遇到大写字母 加”_”的命名git

spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy

参考项目:spring

https://gitee.com/weim/double_mysqlsql

 

最新版本的jpa建立数据库时候,会建立MyISAM引擎数据库

建立InnoDB引擎,在配置文件中使用:spa

#innoDB引擎
spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect
相关文章
相关标签/搜索