一个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. 佛祖保佑 永无BUG 永不修改

    // // _oo0oo_ // o8888888o // 88" . "88 // (| -_- |) // 0\ = /0 // ___/`---'\___ // .' \\| ...

  2. AFNetworking 3.0+ 启用完整、严格的https证书较验参考代码

    // 1.初始化单例类      AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];     manager.securit ...

  3. 12个css高级技巧.html

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  4. struts2数据校验与国际化

    数据校验: Action里的validate()方法能校验action类所有的方法,如果有错,如:addFieldError,会自动返回到workflow校验拦截器不向下继续进行,不用return i ...

  5. 分享大家一个背景为下雪的JQuery

    <html><head> <meta charset="utf-8"> <meta content="IE=edge,chrom ...

  6. windows系统调用 利用事件对象实现进程通信

    #include "iostream" #include "windows.h" #include "cstring" using name ...

  7. paper 111:图像分类物体目标检测 from RCNN to YOLO

    参考列表 Selective Search for Object Recognition Selective Search for Object Recognition(菜菜鸟小Q的专栏) Selec ...

  8. mysql中and和or

    and的优先级高于or,所以一个sql语句中如果and和or同时出现,则or要加括号

  9. VMWare安装Solaris虚拟机的网络设置

    虚拟机的网卡使用Host-only. 在VMWare取消Host-only的DHCP. 在虚拟机的Solaris系统里ipadm命令配置ip.

  10. 关于webservice大数据量传输时的压缩和解压缩

    当访问WebSerivice时,如果数据量很大,传输数据时就会很慢.为了提高速度,我们就会想到对数据进行压缩.首先我们来分析一下. 当在webserice中传输数据时,一般都采用Dataset进行数据 ...