报错 for input String ...
一个String类型的数值后面有空格,如:“10001 ”
要转化成int时用 Integer.parseInt 报错
先用.trim()去掉空格 就可以转换了
这个问题其实很简单 但是我弄了半天,因为 数据库存了char类型 而实体类我写了String,我以为是这个原因导致不对,查了很久。
其实用上面方法可以直接解决的。我调试了半天都不对,是因为缓存没有清干净。
清缓存:
IDEA中删除编译出来的文件
rebuild项目
浏览器清除缓存(最重要)
报错 for input String ...的更多相关文章
- QMUI android 框架 git下载项目运行报错解决 input String“”
1.编译源码,input String“” 解决办法: 打开qmuidemo里面的gradle文件,注释掉顶部的 //def cmd = 'git rev-list HEAD --count'//de ...
- TP5使用路由模式报错 No input file specified.
热烈推荐:超多IT资源,尽在798资源网 application/route.php 是设置路由的文件. 将 route.php 代码修改为 <?php use think\Route; Ro ...
- php报错Array to string conversion 解决方案,动态输出数据库列名称
php报错Array to string conversion 解决方案,动态输出数据库列名称 问题:在Windows php5.3环境下使用:<?php echo $row->$keys ...
- MVC模式下unity配置,报错“No connection string named '**Context' could be found in the application config file”
写在前面: 第一次配置时好好的,后来第二次改到MVC模式,把依赖注入写成字典的单例模式时,由于新建的ORM(数据库映射模型EF),怎么弄都不用,一直报错"No connection str ...
- 报错:required string parameter XXX is not present
报错:required string parameter XXX is not present 不同工具发起的get/delete请求,大多数不支持@RequestParam,只支持@PathVari ...
- MyEclipse下Junit报错"The input type of the launch configuration"
MyEclipse下Junit运行测试用例的时候报错: "The input type of the launch configuration does not exist" 原因 ...
- 安装rpy2 报错<cdef source string>:23:5: before: blah1 解决办法就是直接下载一个rpy2的轮子
win7上安装rpy2, python环境是3.6.1. 使用pip install rpy2直接安装rpy2,对应的版本时rpy2 3.0.5 报如下错误: ERROR: Complete outp ...
- JavaScript在IE6,IE7下报错'expected identifier, string or number'
问题: 代码在Forefox和IE8下工作正常,但是在IE6下报错: expected identifier, string or number 假如变量options有多个选项,那么我们可以用逗号分 ...
- PHP7.1 报错 Warning Illegal string offset
报错如下: Warning: Illegal string offset '阿根廷' in F:\wnmp\www\test.php on line 24 Warning: Illegal strin ...
随机推荐
- alloc
注意,凡是用到指针的地方,一定要在堆中分配空间,否则指针释放了,那就不能够传值了. 将一个对象作为另外一个对象的成员变量,可以直接将两个对象联系起来.
- css before&after 特殊用途
平常仅仅需要将这两个伪元素用于添加一些自定义字符 p:before {content:"hello"} 但我们还可以使用before&after这两个伪类做一些特殊效果 ...
- LeetCode Generalized Abbreviation
原题链接在这里:https://leetcode.com/problems/generalized-abbreviation/ 题目: Write a function to generate the ...
- ReentrantLock的实现语义与使用场景
简介 ReentrantLock(重入锁)就是支持可重进入的锁,它表示该锁能支持一个线程对资源的重复加锁.另外还支持获取锁的公平和非公平选择ReentrantLock的实现不仅可以替代隐式的synch ...
- Spring+Mybatis+SpringMVC+Maven+MySql搭建实例
林炳文Evankaka原创作品.转载请注明出处http://blog.csdn.net/evankaka 摘要:本文主要讲了如何使用Maven来搭建Spring+Mybatis+SpringMVC+M ...
- Web动画API教程2:AnimationPlayer和Timeline
本文转载: Web动画API教程2:AnimationPlayer和Timeline
- html5,新增的元素,fieldset legend
<form action=""> <fieldset> <legend>用户注册</legend> ...
- sql经典语句大全
SQL Server提供了大量的函数, 但是在一些常见的如, 字符串拆分, 字符提取,过滤等没有对应的处理, 本帖主要收集一些常见的函数, 整理如下: ------------------------ ...
- SVN使用教程总结
SVN简介: 为什么要使用SVN? 程序员在编写程序的过程中,每个程序员都会生成很多不同的版本,这就需要程序员有效的管理代码,在需要的时候可以迅速,准确取出相应的版本. Subversion是什么? ...
- CSS 笔记一(Selectors/ Backgrounds/ Borders/ Margins/ Padding/ Height and Width)
Selectors/ Backgrounds/ Borders/ Margins/ Padding/ Height and Width CSS Introduction: CSS stands for ...