随笔分类 - JAVA
摘要:问题: 这种报错非常具有迷惑性,因为不知道是什么导致的,而一般如果是maven找不到依赖的话,会提示missing 这样。 其实这种报错,我遇到的原因,因为下载包异常导致的。 你看到也把jar和pom下载下来了,但是jar包很可能是个无效的jar包。其实你可以看jar包的大小,如果是几KB这种 显然
阅读全文
摘要:maven项目更新报错:Description Resource Path Location Type Failure to transfer XXXX 【步骤1】 window在cmd下输入: (1)cd %userprofile%.m2\repository (2)for /r %i in (*
阅读全文
摘要:引入依赖 <dependency> <groupId>commons-net</groupId> <artifactId>commons-net</artifactId> <version>3.7</version> </dependency> 要实现需求总共分为三步: a. 建立连接;b. 递归目
阅读全文
摘要:1、要把文件名称改成 iso-8859-1 编码 fileName = new String(fileName.getBytes("GBK"),"iso-8859-1"); isSuccess = client.storeFile(fileName, fis);
阅读全文
摘要:1、 public boolean upload(String ftpPath,List<String> fileNameList,List<String> files){ boolean isSuccess = true; FTPClient client = new FTPClient(); F
阅读全文
摘要:执行mybatis的mapper方法时,报错了这个错。 通过网上查找,发现了是JDK版本和oracle版本不一致导致的。(我直接从JDK1.8 换成JDK11就可以了) 以下内容转自:Failed to obtain JDBC Connection; nested exception is java
阅读全文
摘要:1、 java.sql.SQLException: 无效的列索引 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111) at oracle.jdbc.driver.DatabaseError.thr
阅读全文
摘要:XStream xstream = new XStream(); String inputXml = xstream.toXML(student); 引用的jar包 <dependency> <groupId>com.thoughtworks.xstream</groupId> <artifactI
阅读全文
摘要:WSG报错:应通过 @SpringBootApplication 指定特性 IDEA中 @EnableAutoConfiguration 注解报错Attributes should be specifed via @SpringBootApplication 多次用Maven清理重新导包后还是不可以
阅读全文
摘要:* 在正则表达式中\s表示所有的空格: 匹配任何空白字符,包括空格、制表符、换页符等等。等价于 [ \f\n\r\t\v]。注意 Unicode 正则表达式会匹配全角空格符。 * 使用正则表达式,移除换行符(且不移除空格) * * @param originalStr 原始字符串 * @return
阅读全文
摘要:Spring Boot项目@RestController,produces 配置错误会导致2种异常 一、Could not find acceptable representation o.s.w.s.m.support.DefaultHandlerExceptionResolver : Resol
阅读全文
摘要:报文: ERROR: 17:38:36,099 - TcLogger$IC_PrintStream.logButCheckForException:? java.lang.IndexOutOfBoundsException java.lang.IndexOutOfBoundsException: I
阅读全文
摘要:今天早上来公司 领导突然分配了任务,就是简单的测试一下实体的添加修改功能,要使用到Juntil单元测试,目前使用springboot项目,jpa,maven管理,回忆起曾经用到过@Test注解,于是开始唰唰唰的写起了测试咧,然鹅,一顿报错,依赖无法注入,空指针,乱七八糟的一大通,无奈开始借助百度,终
阅读全文
摘要:1、JTable的boolean列的全选/反选/全不选 /** * * @Title: selectAll * @Description: TODO 全选 * @param table * @param checkColumnIndex * @Author:wushigao * @CreateDat
阅读全文
摘要:1、遇到需要用JAVA 8 版本的时候。打包报这个错。 2、解决办法:在MANIFEST.MF 的 Bundle-RequiredExecutionEnvironment 从 JAVASE-1.7 改成 JAVASE-11 就好了
阅读全文
摘要:为什么会出现这种报错。 发现这个最后一个包的名称是util导致的。 后面改成了utis就可以了。com.hfplm.customization.rendering.utils
阅读全文
摘要:comom.teamcenter.rac.common.lov.LOVUIComponent$SwingHierarchicalLOVComponentcom.teamcenter.rac.util.combobox.iComboBox$8 comom.teamcenter.rac.common.l
阅读全文
摘要:Java 去掉字符串前面的空格可以使用 trim() 方法,例如: String str = " hello world"; str = str.trim(); // 去掉前面的空格 System.out.println(str); // 输出 "hello world" trim() 方法会返回去
阅读全文
摘要:一、根据主键更新(传对象) /* * 根据主键更新 * */ int updateById(SysUser sysUser); 2、xml如下: <update id="updateById"> update sys_user set user_name = #{userName}, user_pa
阅读全文

浙公网安备 33010602011771号