
java
songsksks
这个作者很懒,什么都没留下…
展开
-
POI 设置Excel单元格背景色(setFillForegroundColor 与 setFillPattern 的使用)
IndexedColors.AQUA.getIndex() IndexedColors.AUTOMATIC.getIndex() IndexedColors.BLUE.getIndex() IndexedColors.BLUE_GREY.getIndex() IndexedColors.BRIGHT_GREEN.getIndex() IndexedColors.BROWN.getIndex() IndexedColors.CORAL.getIndex() IndexedColors.COR..原创 2020-11-23 14:44:43 · 3544 阅读 · 0 评论 -
一种将枚举Enum转换为JSON对象的方法
JacksonObjectMapper默认将枚举类型Enum转换为它的名称,亦即为字符串,比如将枚举SUCCESS(“SUCCESS”, 200)输出为“SUCCESS”,这丢失了很多额外的信息,并且前端也不易处理,如将服务器返回状态定义为枚举:public enum ActionStatus { SUCCESS("SUCCESS", 200), FAIL_500("FAIL...原创 2019-11-01 13:20:35 · 2804 阅读 · 0 评论 -
JAVA检查是否为乱码
//使用request.getQueryString()获取通过URL传过来的值 有可能是乱码 如:q=鿥 String s = request.getQueryString(); if(s!=null){ if(!(java.nio.charset.Charset.forName("GBK").newEncoder().canEncode(s))){翻译 2017-12-20 16:26:35 · 1050 阅读 · 0 评论 -
list深拷贝的方法
public static List deepCopy(List src) throws IOException, ClassNotFoundException { ByteArrayOutputStream byteOut = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutput翻译 2018-01-31 14:00:28 · 2042 阅读 · 0 评论 -
java.lang.OutOfMemoryError: PermGen space及其解决方法
PermGen space的全称是Permanent Generation space,是指内存的永久保存区域OutOfMemoryError: PermGen space从表面上看就是内存益出,解决方法也一定是加大内存。说说为什么会内存益出:这一部分用于存放Class和Meta的信息,Class在被 Load的时候被放入PermGen space区域,它和和存放Instance的Heap区域不同转载 2018-01-26 15:35:36 · 585 阅读 · 0 评论 -
eclipse的eclipse.ini优化
根据个人电脑配置调整下面的参数org.eclipse.platform--launcher.XXMaxPermSize256m--launcher.defaultActionopenFile--launcher.appendVmargs-vmargs-Dosgi.requiredJavaVersion=1.6-XX:MaxPermSize=256m-Xms40m-Xmx2048m-Xss1024k...翻译 2018-03-28 15:20:18 · 5607 阅读 · 0 评论