报错 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 ...
随机推荐
- maven说
maven打包命令:mvn assembly:assembly 打包成jar包需要修改配置把unpack改成false文件在: C:\Users\Administrator\.m2\repositor ...
- ssm框架web.xml中filter配置问题
<?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://w ...
- 如何保证App外包的最终质量,不延期不烂尾?
选择App外包服务的客户,最害怕的就是App项目延期甚至烂尾.投入了巨大的时间和财富,结果最后App无法上线. 解决这个问题有两个方法:第一,在选择公司前,先了解清楚有关App外包的一切问题,做到心里 ...
- tableView和scrollView滚动起冲突
tableView和scrollView滚动起冲突 tableView也是继承的scrollView,所以在滚动的时候也会触发scrollView的代理方法,在scrollViewDidScroll中 ...
- Simple JavaScript Inheritance--一个极简JS面向对象-类库
面向对象 面向对象思想的几个重要特征(针对类的要求): 抽象-封装.信息隐藏(将内部实现的方法和数据隐藏, 定义开放的接口) 继承-子类可以使用父类的资源,并可以定制自己的资源, 资源包括方法和数据 ...
- RDIFramework.NET ━ Web中打印的各种方案参考-欢迎补充
RDIFramework.NET ━ Web中打印的各种方案参考-欢迎补充 做Web开发的同志应该都深有体会,在web程序中打印不再象应用程序中那样便于控制了,web程序天生的一些特性造成了这个缺点, ...
- Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead
Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead 在解决问题Underscores can only ...
- 解决Ruby在IE11中报Unable to get browser (Selenium::WebDriver::Error::NoSuchWindowError)的错误
转载地址:http://www.tuicool.com/articles/BRnqeu2 I was updating the browser WebDrivers for Seleno ...
- .Net 中HashTable,HashMap 和 Dictionary<key,value> 和List<T>和DataTable的比较
参考资料 http://www.cnblogs.com/MichaelYin/archive/2011/02/14/1954724.html http://zhidao.baidu.com/link? ...
- REPL LOG
using System; using System.Collections.Generic; using System.Text; using System.Text.RegularExpressi ...