Error attempting to get column 'USER_ID' from result set.:  Cause: java.sql.SQLException: 无法转换为内部表示

本文探讨了在使用 Spring MVC 过程中遇到的数据类型不匹配错误,具体表现为前台传递的 USER_ID 参数为字符串类型,而后台期望的是整型。文章详细分析了该问题的原因,并提供了可能的解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 SEVERE [http-apr-8086-exec-10] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [springMVC] in context with path [/test] threw exception [Request processing failed; nested exception is org.springframework.jdbc.UncategorizedSQLException: Error attempting to get column 'USER_ID' from result set.  Cause: java.sql.SQLException: 无法转换为内部表示

类型不一致,前台传的是string ,而set get是int无法转为内部表示

评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值