一个String类型的数值后面有空格,如:“10001         ”

要转化成int时用     Integer.parseInt  报错

先用.trim()去掉空格 就可以转换了

这个问题其实很简单 但是我弄了半天,因为 数据库存了char类型 而实体类我写了String,我以为是这个原因导致不对,查了很久。

其实用上面方法可以直接解决的。我调试了半天都不对,是因为缓存没有清干净。

清缓存:

IDEA中删除编译出来的文件

rebuild项目

浏览器清除缓存(最重要)

报错 for input String ...的更多相关文章

  1. QMUI android 框架 git下载项目运行报错解决 input String“”

    1.编译源码,input String“” 解决办法: 打开qmuidemo里面的gradle文件,注释掉顶部的 //def cmd = 'git rev-list HEAD --count'//de ...

  2. TP5使用路由模式报错 No input file specified.

    热烈推荐:超多IT资源,尽在798资源网 application/route.php 是设置路由的文件. 将 route.php 代码修改为 <?php use think\Route; Ro ...

  3. php报错Array to string conversion 解决方案,动态输出数据库列名称

    php报错Array to string conversion 解决方案,动态输出数据库列名称 问题:在Windows php5.3环境下使用:<?php echo $row->$keys ...

  4. MVC模式下unity配置,报错“No connection string named '**Context' could be found in the application config file”

     写在前面: 第一次配置时好好的,后来第二次改到MVC模式,把依赖注入写成字典的单例模式时,由于新建的ORM(数据库映射模型EF),怎么弄都不用,一直报错"No connection str ...

  5. 报错:required string parameter XXX is not present

    报错:required string parameter XXX is not present 不同工具发起的get/delete请求,大多数不支持@RequestParam,只支持@PathVari ...

  6. MyEclipse下Junit报错"The input type of the launch configuration"

    MyEclipse下Junit运行测试用例的时候报错: "The input type of the launch configuration does not exist" 原因 ...

  7. 安装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 ...

  8. JavaScript在IE6,IE7下报错'expected identifier, string or number'

    问题: 代码在Forefox和IE8下工作正常,但是在IE6下报错: expected identifier, string or number 假如变量options有多个选项,那么我们可以用逗号分 ...

  9. PHP7.1 报错 Warning Illegal string offset

    报错如下: Warning: Illegal string offset '阿根廷' in F:\wnmp\www\test.php on line 24 Warning: Illegal strin ...

随机推荐

  1. jquery实现nav的下拉

    <script type="text/javascript"> $(function(){ //tab_flag 根据此标记判断是否由父级nav指向了nav_list ...

  2. Ubuntu 14.04 升级gcc 4.8到gcc 5.x

    简介 有些软件比较新,需要更高的gcc版本,所以需要升级gcc.编译安装比较耗时,所以直接选择bin包就好. 步骤 添加源 sudo add-apt-repository ppa:ubuntu-too ...

  3. oracle从零开始学习笔记

    查询现有数据库:select name from V$database; 解锁用户scott:alter user scott account unlock; 普通用户连接:conn scott 默认 ...

  4. UIWebView中Html中用JS调用OC方法及OC执行JS代码

    HTML代码: <html> <head> <title>HTML中用JS调用OC方法</title> <meta http-equiv=&quo ...

  5. RML-怎样的语句会被归纳为同一类型(Unique Batches)

    我们知道使用RML工具分析跟踪数据(.TRC),其中的"Unique Batches",就是一个关于Batch级别的报表,Batch级别的报表针对的是存储过程或是一个TSQL Ba ...

  6. 远程无法连接Mysql 的解决方案

    问题描述: 新安装了MySQL 5.6,使用root用户无法远程连接, 提示Host 'xxx.xxx.xxx.xxx' is not allowed to connect to this MySQL ...

  7. Leetcode: Minimum Number of Arrows to Burst Balloons

    There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided ...

  8. .net环境下ckeditor与ckfinder中文文件链接乱码的问题

    .net环境下ckeditor与ckfinder中文文件链接乱码的问题 将ckfinder.js中的getUrl:function(){return this.folder.getUrl()+enco ...

  9. 看门外汉如何实现:C#操作 MongoDB基本CURD的事务控制

    第一部分 基本设计 目前最新版本的C#驱动MongoDB-CSharpDriver-2.2.3,比之前的版本更新比较大,在网上很难找到这个版本的相关C#操作资料,以下都是个人自发研究.测试的,如有雷同 ...

  10. POJ 1852 Ants

    题目的意思是说一个长度为m的杆,上面有n个蚂蚁,告诉每个蚂蚁的初始位置,每个蚂蚁速度都是一样的,问所有的蚂蚁离开杆的最短和最长时间是多少. 模拟题,所有的蚂蚁看成一样的,可以这样理解,即使相撞按反方向 ...