- 【SpringBoot】Cannot determine val
- 【SpringBoot】问题Cannot determine e
- 98. Validate Binary Search Tree
- ReactNative 加载图片数据NSString canno
- 解决 Cannot determine embedded dat
- spriing boot :Cannot determine e
- Latex Cannot determine size of g
- CMake Error: Cannot determine li
- SpringBoot使用@project.version@出现&
- Android Ffmpeg Cannot find a val
开发SpringBoot过程中程序发生异常,提示“Cannot determine value type from string 'xxx' with root cause”错误,根据Log显示数据格式错误,试了修改数据格式,没用,在此记录解决办法。
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: Error attempting to get column 'name' from result set. Cause: java.sql.SQLDataException: Cannot determine value type from string 'xiaoming'
; Cannot determine value type from string 'xiaoming'; nested exception is java.sql.SQLDataException: Cannot determine value type from string 'xiaoming'] with root cause
com.mysql.cj.exceptions.DataConversionException: Cannot determine value type from string 'xiaoming'
解决办法:这种情况出现还可能是实体类实现有参构造函数后,没有写无参构造函数,添加无参构造函数即可。
//无参构造函数
public UserBean() {
}
public UserBean(String name, int age) {
this.name = name;
this.age = age;
}
网友评论