jeecg 3.7.2在用户管理中,用户账号最多10 个字符。但是现实不一定满足需求,在数据库把账号改的长一点,在重置中账号密码。 在登录的时候报错(前提: 修改了TSBaseUser.java 的实体类 的@Column 注解,数据库字段长度也修改过 )
后端控制台报错
[2018-05-09 10:31:15] [WARN] [org.hibernate.engine.jdbc.spi.SqlExceptionHelper:143] SQL Error: 1406, SQLState: 22001
[2018-05-09 10:31:15] [ERROR] [org.hibernate.engine.jdbc.spi.SqlExceptionHelper:144] Data truncation: Data too long for column 'username' at row 1
[2018-05-09 10:31:15] [ERROR] [org.jeecgframework.core.common.exception.GlobalExceptionResolver:86] 全局处理异常捕获:
com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'username' at row 1
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4235)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2825)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2459)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2376)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2360)
jquery-1.8.3.min.js:2 POST http://localhost:8080/jeecg/loginController.do?checkuser 500 (Internal Server Error)
send @ jquery-1.8.3.min.js:2
ajax @ jquery-1.8.3.min.js:2
newLogin @ (index):359
checkUser @ (index):323
onclick @ (index):269
jquery-1.8.3.min.js:2 Uncaught SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at Function.parseJSON (jquery-1.8.3.min.js:2)
at Object.success (login.js:149)
at l (jquery-1.8.3.min.js:2)
at Object.fireWith [as resolveWith] (jquery-1.8.3.min.js:2)
at T (jquery-1.8.3.min.js:2)
at r (jquery-1.8.3.min.js:2)
at Object.send (jquery-1.8.3.min.js:2)
at Function.ajax (jquery-1.8.3.min.js:2)
at Login (login.js:140)