问题描述:
org.springframework.dao.DataIntegrityViolationException: Error attempting to get column 'userName' from result set. Cause: java.sql.SQLDataException: Value '测试' is outside of valid range for type java.lang.Byte
问题分析:
1、userName类型为Byte,但是从数据库接收到的值为字符串,类型不匹配导致报错。
解决办法:
userName类型改为String。