java常见错误(Error querying database. Cause: java.lang.NumberFormatException: For input string: “PH)
异常错误
【java常见错误(Error querying database. Cause: java.lang.NumberFormatException: For input string: “PH)】###Error querying database. Cause: java.lang.NumberFormatException: For input string: “PHP”
###Cause: java.lang.NumberFormatException: For input string: “PHP”] with root cause
java.lang.NumberFormatException: For input string: “PHP”
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043) ~[na:1.8.0_251]
at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110) ~[na:1.8.0_251]
at java.lang.Double.parseDouble(Double.java:538) ~[na:1.8.0_251]
at org.apache.ibatis.ognl.OgnlOps.doubleValue(OgnlOps.java:243) ~[mybatis-3.5.2.jar:3.5.2]
at org.apache.ibatis.ognl.OgnlOps.compareWithConversion(OgnlOps.java:100) ~[mybatis-3.5.2.jar:3.5.2]
at org.apache.ibatis.ognl.OgnlOps.isEqual(OgnlOps.java:143) ~
错误解析
文章图片
这边解析到0是int类型,默认进来到参数也应该是
解决方案
="getCategoryPlate" resultType="com.mk.springboot.vo.CategoryPlateVO" parameterType="String">
SELECT category.*, plate.`name` as `plateName` FROM category,plate WHERE category.plate_id=plate.id
AND category.name = #{name}
推荐阅读
- JAVA(抽象类与接口的区别&重载与重写&内存泄漏)
- 事件代理
- Java|Java OpenCV图像处理之SIFT角点检测详解
- java中如何实现重建二叉树
- 唱歌教学(导致嗓音损坏的几个常见的错误唱歌方法!)
- 调取接口时报404错误(ID:16)
- Hive常见问题汇总
- 数组常用方法一
- 【Hadoop踩雷】Mac下安装Hadoop3以及Java版本问题
- Java|Java基础——数组