Quinn 发表于 2018-4-11 13:52:25

关于t_s_base_user表字段加长

请问: 如何将 t_s_base_user 表的 username 字段变长而不报错 ,我已经将它设为32长度了,可以录入用户,但是使用有些功能的时候会报:

description The server encountered an internal error () that prevented it from fulfilling this request.

exception
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: Data truncation: Data too long for column 'username' at row 1; SQL ; nested exception is org.hibernate.exception.DataException: Data truncation: Data too long for column 'username' at row 1
        org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:973)
        org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
        org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        org.jeecgframework.core.aop.GZipFilter.doFilter(GZipFilter.java:119)
        com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:140)
        org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
        org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)
        org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)


admin 发表于 2018-4-11 17:52:02

那设置再长点

Quinn 发表于 2018-4-11 18:12:53

admin 发表于 2018-4-11 17:52 static/image/common/back.gif
那设置再长点

已经设置成100了,还是说to long .    现在的根本问题是 : 加长了username的字段后, 代码中除了实体外是否还有其它限制了 username 的长度的 ,因为现在即使加到了100 ,也可以成功录入, 但某些功能还是限制在10长度
页: [1]
查看完整版本: 关于t_s_base_user表字段加长