ICode9

精准搜索请尝试: 精确搜索
  • 多线程下,使用SimpleDateFormat格式化时间报NumberFormatException2022-08-08 11:31:58

    案例:解决SimpleDateFormat格式化时间异常 java.lang.NumberFormatException: For input string: "20022E.20022E44" 案例:解决SimpleDateFormat格式化时间异常 java.lang.NumberFormatException: For input string: "20022E.20022E44" - it610.com

  • Integer.parseInt()遇到java.lang.NumberFormatException: For input string: "0" ,最终发现是编码问题。带有非法2022-08-08 09:30:27

    start = Integer.parseInt(ss.trim());cnt = Integer.valueOf(cc.trim()); java.lang.NumberFormatException: For input string: "0" 代码是从一个 txt文本读取一行 如 0,7 的拆分进行int转换,结果报错,百度了很久,调试看得到的 也是标准字符串“0” ,万万没有想到前面还有个非法

  • java.lang.NoClassDefFoundError: org/springframework/util/unit/DataSize2022-08-04 18:31:09

    包冲突。 我的解决方法是: 在父pom的dependencyManagement节点中,增加引用。 然后子项目直接使用。 <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId&g

  • Failed to convert value of type ‘java.lang.String‘ to required type ‘java.lang.Integer‘2022-08-03 18:32:42

    Failed to convert value of type ‘java.lang.String‘ to required type ‘java.lang.Integer‘ 这个问题常见出现于前端发送数据和后端接口所需数据不同。 第一有可能是我们没有对传输回去的数据进行处理转型导致数据类型不匹配。 第二是有可能我们的数据本身不符合转型的条件,

  • mybaitis传参数问题:There is no getter for property named 'id' in class 'java.lang.String&#2022-08-03 16:02:32

    在使用mybaitis传参数的时候,如果仅传入一个类型为String的参数,且需要判断null或者" ",那么在 xml文件中应该使用_parameter来代替参数名。 错误的写法: <select id="isCargoBillNoExist" resultType="java.lang.Integer"> select count(1) from t_entry_cargo_

  • (转)Java 8:一文掌握 Lambda 表达式2022-07-30 18:04:18

    原文:https://zhuanlan.zhihu.com/p/90815478   List list = function.apply(10); 使用 Lambda 表达式,我们一般可以这样写: Function<Integer, ArrayList> function = n -> new ArrayList(n); 使用「引用构造方法」的方式,我们可以简写成这样: Function<Integer, ArrayList> fu

  • Java编码错误 - java.lang.NumberFormatException: For input string: ")"2022-07-30 00:31:41

    代码目的:解决表达式求值 请写一个整数计算器,支持加减乘三种运算和括号。 数据范围:0\le |s| \le 1000≤∣s∣≤100,保证计算结果始终在整型范围内 要求:空间复杂度: O(n)O(n),时间复杂度 O(n)O(n) 示例1 输入: "1+2" 返回值:3 错误代码 public int solve (String s) {

  • java.lang.UnsupportedOperationException: null2022-07-29 14:33:44

    下面这段代码, public void addAllToChild(List<DocTreeVo> list) { if (CollectionUtils.isEmpty(list)) { return; } if (childList == null) { childList = new ArrayList<>(); } childList.a

  • [Bug0036] invalid comparison java.util.Date and java.lang.String2022-07-28 20:33:51

    nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: java.lang.IllegalArgumentException: invalid comparison: java.util.Date and java.lang.String ### Cause: java.lang.IllegalArgumentException: invalid c

  • [转]BeanUtils.copyProperties使用总结以及注意事项2022-07-24 12:03:58

    1.前言开发过程中,讲一个对象的属性和值赋值到另一个对象上,大量使用了get、set方法,看着很臃肿,思考下肯定不只有我有这种想法,所以技术上肯定有方法能解决这个问题,所以查阅了一些资料发现了BeanUtils.copyProperties这个方法以下是这次所有的总结以及使用时的注意事项。使用org.sprin

  • Linux 字符集2022-07-23 19:04:51

    # echo $LANG #查看当前使用的字符集,检查(rh6、7都一样)# export LANG=zh_CN.UTF-8 #临时修改字符集,重启失效 # vim /etc/locale.conf #永久性修改(1)# source /etc/locale.conf #永久性生效 # localectl

  • Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletRegistration$Dynamic2022-07-21 08:36:59

    在使用servlet-api时报如下错误: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'statViewServletRegistrationBean' defined in class path resource [com/alibaba/druid/spring/boot/autoconfigure/stat/DruidStatViewServletC

  • centos7更改中文2022-07-20 15:31:41

    这是在CentOS7中设置,CentOS6的是在 .etc/sysconfig/i18n 配置文件下。在root用户下操作,使用 locale 命令查看语言环境,看到 LANG=en_US.utf8 为美国英文的 locale 查看locale.conf 配置文件 ls /etc | grep locale 编辑locale.conf 配置文件 vim /etc/locale.conf 修改 L

  • Android Custom View使用Databinding2022-07-20 11:34:16

    Android Custom View是可以使用 databinding 的 //java.lang.IllegalArgumentException: View is not a binding layout// val bindingTemp = DataBindingUtil.bind<V>(view) val inflater = context.getSystemService(Context.LAYOUT_INFLATER

  • vue 配置 i18n 多语言2022-07-17 14:01:53

    1、安装 i18n 模块 vue-i18n与vue存在版本兼容性问题,我们这里用的vue 2.6.10,配合vue-i18n 8.2.1版本使用 安装vue-i18n npm install vue-i18n@8.2.1 --save 2、配置main.js import VueI18n from 'vue-i18n' Vue.use(VueI18n) const i18n = new VueI18n({ locale: window.session

  • 【IDEA创建Maven项目报错- Error injecting constructor, java.lang.NoSuchMethodError: org.apache.maven.model】2022-07-13 22:34:42

    今天从git拉取项目到本地的时候,发现构建maven的时候出现了如上错误。通过百度得知是maven版本和idea版本不兼容的问题。网上大都是说降低maven的版本就可以了,这个问题确实能解决90%人的问题。但是我降低版本后发现不起作用。 降低版本重新构建发现还是使用的高版本maven。 经过排

  • 修改Linux7的系统默认语言2022-07-12 18:03:51

    第一步:vi /etc/locale.conf    第二步:   将里面的内容修改为:LANG="zh_CN.UTF-8"    第三步:reboot

  • 控制台报错:java.lang.IllegalArgumentException:Invalid character found in method name[xxxxx]. HTTP method2022-07-12 16:37:36

    前提:IDEA开发本地是spring boot项目,用的自带的tomcat   问题描述:项目在开发本地启动正常,发包到测试环境,界面调接口也正常,postman调用本地接口也正常。gradle打包并发到虚拟机上,项目启动是正常的,但是界面调接口后报错java.lang.IllegalArgumentException:Invalid character found

  • Spark解决问题2022-07-12 14:00:53

    Spark解决问题 配置pom.xml文件 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=&q

  • 壁纸网站2022-07-10 20:01:16

    壁纸网站

  • List 移除元素 报错 java.lang.UnsupportedOperationException2022-07-08 14:02:02

    异常信息:java.lang.UnsupportedOperationException    at java.util.AbstractList.remove(AbstractList.java:161)    at java.util.AbstractList$Itr.remove(AbstractList.java:374)    at java.util.Collection.removeIf(Collection.java:415) .........   前言:说这个

  • Debug追踪,异常概念&异常体系2022-07-07 10:34:55

    Debug追踪: Debug追踪在java中又叫Debug调试程序 可以让代码逐行执行,查看代码执行的过程,调试程序中出现的bug 使用方式: 在行号的右边,鼠标左键单击,添加断点(每个方法的第一行,哪里有bug添加到哪里)右键,选择Debug执行程序 程序就会停留在添加的第一个断点处 执行程序: f8:逐行执行程

  • 异常概念 异常体系 异常分类2022-07-06 21:00:16

    异常概念异常,就是不正常的意思。在生活中:医生说,你的身体某个部位有异常;该部位和正常相比有点不同,该部位的功能将受影响.在程序中的意思就是·异常︰指的是程序在执行过程中,出现的非正常的情况,最终会导致JVM的非正常停止。在Java等面向对象的编程语言中,异常本身是一个类,产生异常

  • 自定义注解为属性赋值2022-07-04 01:03:09

    本文将介绍如何使用自定义注解加载配置文件中的信息给类中的属性赋值 定义注解 定义@LoadProperty注解,用来加载配置文件 import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annot

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有