본문 바로가기

java36

String to Date format string For java @SuppressLint("SimpleDateFormat") public static String toDateFormat(String v) { String rtn = ""; if ( StringUtils.isNotEmpty(v) ) { v = v.replaceAll("[^0-9]", ""); System.out.println(v); SimpleDateFormat pm = new SimpleDateFormat("yyyyMMdd"); SimpleDateFormat sm = new SimpleDateFormat("yyyy-MM-dd"); try { Date vd = pm.parse(v); rtn = sm.format(vd); } catch (ParseException e) { e.printStackTrace(.. 2015. 12. 28.
java generic classes http://www.slideshare.net/yanngaelgueheneuc/java-generic-classes/1?src=clipshare 2015. 12. 28.
POJO to String by java reflection public static void pojoToString(Object obj) { Class cls = obj.getClass(); Field fieldlist[] = cls.getDeclaredFields(); for (int i = 0; i < fieldlist.length; i++) { Field fld = fieldlist[i]; // Util.i("name = " + fld.getName()); // Util.i("decl class = " + fld.getDeclaringClass()); // Util.i("type = " + fld.getType()); // int mod = fld.getModifiers(); // Util.i("modifiers = " + Modifier.toString(.. 2015. 12. 28.
cors enable 가이드. http://enable-cors.org 2015. 10. 8.
log4jdbc logback 설정. JAVA/Servlet 목록열기 (198) 목록열기 스크랩 엮인글 myBatis + log4j + log4jdbc (myBatis Query Logging) JAVA/Servlet 2015.03.12. 19:51 http://blog.naver.com/pureb612b/220298184301 전용뷰어 보기 출처 : http://a.zany.kr:9003/board/bView.asp?bCode=52299899&aCode=7620 ​ ● pom.xml 에 dependency 추가 - Apache log4j : http://logging.apache.org/log4j/1.2 - SLF4J : http://www.slf4j.org - log4jdbc : http://code.google.com/p/log4jdb.. 2015. 10. 2.
rowspan 계산. package test; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.beans.BeanUtils; public class TestRowspan { public static void load( List resultListAuthdate) { TestModel v0 = new TestModel(); TestModel v1 = new TestModel(); TestModel v2 = new TestModel(); TestModel v3 = new TestModel(); TestModel v4 = new TestModel(); Te.. 2015. 8. 18.