排序
Java中新建文件并写入内容工具类
Java代码实现新建文件并写入内容的工具类,内容如下: package lc.util; import org.apache.commons.lang.StringUtils; import java.io.*; /** * @author : https://www.ddmit.com/ */ public c...
java.util.ConcurrentModificationException解决办法
今天在遍历list集合时同时对list集合进行增加和删除操作,导致了以下错误: java.util.ConcurrentModificationException at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:81...
将Java程序打包成可运行的jar文件(亲测可行)
一、java项目没有导入第三方jar包 这时候打包就比较简单: 首先在MyEclipse中打开项目, 右键点击项目,选择 “Export”; 选择Java/JAR file,Next; Select the resources to export中可以选...
Java中日期时间Date类型、long类型与String类型转换
1.Date类型转换成long类型 java.util.Date dt = new Date(); System.out.println(dt.toString()); //java.util.Date的含义 long lSysTime1 = dt.getTime() / 1000; //得到秒数,Date类型的getTi...
Spring Boot中配置logback打印mybatis日志
方式1 配置如下: logback-spring.xml <?xml version='1.0' encoding='UTF-8'?> <!-- scan 配置文件如果发生改变,将会被重新加载 scanPeriod 检测间隔时间--> <configuration s...
Spring Boot读取jar包文件错误解决
从jar包中读取classpath下文件出错: java.io.FileNotFoundException: class path resource [conf/sendofd.xml] cannot be resolved to absolute file path because it does not reside in the ...
Junit 4测试Service方法的几种方式
Junit单元测试,测试Service方法,注入Service的方式有以下两种: Maven依赖: <properties> <!-- 源文件编码格式 --> <project.build.sourceEncoding>UTF-8</project.bui...
JFreeChart解决中文乱码问题
比如柱状图,柱状图的柱子说明文字中文情况下乱码,解决代码如下: // JFreeChart主题设置,解决中文乱码 StandardChartTheme standardChartTheme = new StandardChartTheme('CN');//这里的'nam...
intellij idea 清除版本控制
一、概述 intellij idea 再加入版本控制后,在工作空间中的项目文件都会纳入管理范围,这样idea左侧 “project视图” 中的项目及文件也会出现红色(可能其它颜色),若使用其他客户端工作,完全...
Java中Timer和ThreadPoolExecutor的区别和比较
今天闲来无事读Java中Timer的源码,发现Timer的注释中有这么一段 Java 5.0 introduced the {@code java.util.concurrent} package and one of the concurrency utilities therein is the {@link...

