![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Hibernate
站在墙头上
挣不到钱,只能发奋图强好好学习
展开
-
javax.persistence中@Column定义字段类型
在@Column中有个比较强大的配置 columnDefinition,如果有不好定义或者java没有这个属性的直接用columnDefinition根据ddl来定义即可,字段的注释也是可以定义的。package com.ld.entity;import com.alibaba.fastjson.JSONArray;import com.alibaba.fastjson.serialize...原创 2020-05-04 22:49:59 · 7026 阅读 · 0 评论 -
修改Springboot2.0中Hibernate自动创建的mysql表的存储引擎默认为MyISAM,字符集为latin1的问题。
今天在使用Springboot2.0中Hibernate的自动创建表的功能时发现表的存储引擎为MyISAM,字符集为latin1。都不是我们所需要的,我们需要的是存储引擎为InnoDB,字符集为UTF-8.。解决方法第一步:applications.properties配置文件中添加hibernate方言配置spring.jpa.properties.hibernate.dialect=or...原创 2020-05-04 21:41:10 · 580 阅读 · 0 评论