2017年8月11日

PhoneUtil

摘要: 1 package cn.fraudmetrix.octopus.horai.biz.utils; 2 3 import org.springframework.util.StringUtils; 4 5 import java.util.regex.Matcher; 6 import java.u 阅读全文

posted @ 2017-08-11 17:37 默默红尘 阅读(258) 评论(0) 推荐(0) 编辑

Md5Util

摘要: 1 package cn.fraudmetrix.octopus.horai.biz.utils; 2 3 import java.security.MessageDigest; 4 import java.security.NoSuchAlgorithmException; 5 6 public 阅读全文

posted @ 2017-08-11 17:32 默默红尘 阅读(173) 评论(0) 推荐(0) 编辑

ListUtil(差集、交集、并集)

摘要: 1 package cn.fraudmetrix.octopus.horai.biz.utils; 2 3 import java.util.ArrayList; 4 import java.util.Arrays; 5 import java.util.Collections; 6 import 阅读全文

posted @ 2017-08-11 17:28 默默红尘 阅读(331) 评论(0) 推荐(0) 编辑

文件上传submit、ajax方式

摘要: submit方式: 1 <form id="postForm" name="postForm" action="${rc.contextPath}/backdoor/uploadGroovy/upload" 2 enctype="multipart/form-data" method="post"> 阅读全文

posted @ 2017-08-11 17:02 默默红尘 阅读(400) 评论(0) 推荐(0) 编辑

2017年7月28日

spring注解方式 idea报could not autowire

摘要: 在Idea的spring工程里,经常会遇到Could not autowire. No beans of 'xxxx' type found的错误提示。 但程序的编译和运行都是没有问题的,这个错误提示并不会产生影响。 造成原因是: spring auto scan配置,在编辑情况下,无法找不到对应的 阅读全文

posted @ 2017-07-28 15:09 默默红尘 阅读(373) 评论(0) 推荐(0) 编辑

2017年7月13日

值传递和引用传递

摘要: 先看一段代码,是我遇到过的一道面试的笔试题: 1 /** 2 * ***面试题 3 */ 4 public class StringBufferTest { 5 public static void main(String[] args) { 6 int i = 10; 7 test(i); 8 S 阅读全文

posted @ 2017-07-13 16:17 默默红尘 阅读(274) 评论(0) 推荐(0) 编辑

Integer中1000==1000为false而100==100为true

摘要: 1 /** 2 * Created by hunt on 2017/6/3. 3 */ 4 public class TestInteger { 5 public static void main(String[] args) { 6 Integer i1 = 100, i2 = 100; 7 Sy 阅读全文

posted @ 2017-07-13 16:03 默默红尘 阅读(823) 评论(0) 推荐(0) 编辑

2017年6月29日

获得一个类的方法

摘要: 通过class.getMethos()方法获得类的所有公共方法包括父类的公共方法。 1 import lombok.Data; 2 3 /** 4 * Created by hunt on 2017/6/27. 5 * 测试的实体类 6 * @Data 编译后会自动生成set、get、无惨构造、eq 阅读全文

posted @ 2017-06-29 17:35 默默红尘 阅读(225) 评论(0) 推荐(0) 编辑

获得一个类的属性

摘要: 通过class.getFields()方法获得类的所有公共属性。 如果该类或接口不声明任何字段,或者此 Class 对象表示一个基本类型、一个数组类或 void,则此方法返回一个长度为 0 的数组。 1 import lombok.Data; 2 3 /** 4 * Created by hunt 阅读全文

posted @ 2017-06-29 17:03 默默红尘 阅读(235) 评论(0) 推荐(0) 编辑

Apache的对象复制详解

摘要: BeanUtils.copyProperties 和 PropertyUtils.copyProperties 两个工具类都是对两个bean之前存在name相同的属性进行处理,无论是源bean或者目标bean多出的属性均不处理。 其原理是通过JDK自带的反射机制动态的去get,set,从而去转换我们 阅读全文

posted @ 2017-06-29 15:55 默默红尘 阅读(2102) 评论(0) 推荐(0) 编辑

导航