文章的正文detail就需要设置为text

在getter方法上添加注解

 @Lob
    @Basic(fetch = FetchType.LAZY)
    @Type(type = "text")
    @Column(name = "detail", nullable = true)
    public String getDetail() {
        return detail;
    }

删除表,让hibernate自己建表

运行效果

hibernate4注解字段为mysql的text

 

相关文章:

  • 2021-08-14
  • 2021-12-17
  • 2021-08-15
  • 2022-01-18
  • 2022-01-01
  • 2021-09-14
猜你喜欢
  • 2021-11-05
  • 2021-12-10
  • 2022-12-23
  • 2021-10-19
  • 2021-06-17
  • 2021-05-15
相关资源
相似解决方案