一个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. RESTful在asp.net webAPI下的PUT、POST实现,json传输实体

    1.put方式实现 使用的是firefox的插件:httpRequester 2.Post实现 同上, 传入json,后台得到实体: 3.post传入string字符串,注意,string传入的时候, ...

  2. ubuntu下mysql添加用户的问题

    在ubuntu下使用命令: $:sudo apt-get install mysql-server 命令安装的Mysql 版本为:Server version: 5.7.13-0ubuntu0.16. ...

  3. CSS之border

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

  4. [Android Tips] 12. How to Create a Dash Line Shape

    <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http: ...

  5. 必须使用"角色管理工具"安装或配置microsoft.net framework 3.5

    windows 2008 R2 安装.net framework 3.5报错 : 解决方法: (1)打开服务器管理器 (2)右击左侧功能——>添加功能 (3)向导中勾选.NET Framewor ...

  6. ZeroClipboard 插件实现文本复制到剪贴板

    ZeroClipboard 的官网 点这里,github地址 点这里. 事例如下: 在引入 ZeroClipboard.js 之后, <button id="clip_button&q ...

  7. C# 类的属性

    属性是一个方法或者一对方法.客户端看来是一个字段. 定义属性 public int StudyHours{ //啥不写,默认有get;set; 和后备字段studyHours是private的 get ...

  8. 介绍kali下的一些小工具

    1.macchanger 可以用来修改你的mac地址

  9. WMI资料汇总

    简介 http://technet.microsoft.com/zh-cn/library/ee692772.aspx#E5IAC 主页 http://msdn.microsoft.com/zh-cn ...

  10. 怎样手动添加 Sublime 3 右键菜单

    [Version] Signature="$Windows NT$" [DefaultInstall] AddReg=SublimeText3 [SublimeText3] hkc ...