Java 썸네일형 리스트형 java sha-512 암호화만 import java.security.NoSuchAlgorithmException; import org.apache.commons.codec.digest.DigestUtils; public class CodecSha512Test { public static void main(String[] args) { MessageDigest md; String message = "1234567890123456"; String mes1 = ""; String mes2 = ""; try { md = MessageDigest.getInstance("SHA-512"); md.update(message.getBytes()); byte[] mb = md.digest(); for (int i = 0; i < mb.length; .. 더보기 정규식 - 01 http://kio.zc.bz/Lecture/regexp.html 자바스크립트 정규식 설명 replace(/^\s*|\s*$/g, '') ^ : 문자열의 시작 \s* : 임의의 개수의 공백 문자, \s 가 공백, *가 임의의 개수 | : OR 기호 $ : 문자열의 끝 g : 문자열의 모든 부분에 걸쳐 글로벌하게 치환 '' : 치환할 빈 문자열임. 작은따옴표2개임. 빈 문자열로 치환(replace)하면 문자열 삭제가 됨 즉, 문자열의 첫부분에 붙은 공백들과, 끝부분에 붙은 공백들을 모두 삭제하라는 뜻이 됩니다. 더보기 json data 사용하기 For information from JSON file click the button given below : 더보기 jdom 이런 xml 만들어 볼까요 이렇게 만드세요 package test; import static org.junit.Assert.*; import java.io.FileWriter; import java.io.IOException; import org.jdom.Attribute; import org.jdom.CDATA; import org.jdom.Document; import org.jdom.Element; import org.jdom.output.Format; import org.jdom.output.XMLOutputter; import org.junit.Test; public class XmlMakeTest { @Test public void test() { // root element 만들고 Eleme.. 더보기 json-lib Maven Repository net.sf.json-lib json-lib jdk15 2.4 더보기 java.util.Date 에 원하는 날짜 넣기 private Date getDate(String data) { String[] splitedData = data.split("/"); Calendar cal = Calendar.getInstance(); cal.set(Integer.parseInt(splitedData[0]), Integer.parseInt(splitedData[1]) - 1, Integer.parseInt(splitedData[2])); return cal.getTime(); } 더보기 log 찍기 생활화 System.out.println 탈출 protected final Log logger = LogFactory.getLog(getClass()); private static final Log logger = LogFactory.getLog(EgovFaqManageController.class); logger.debug("name = " + name + " , value = " + value.toString()); logger.debug("authentication : " + authentication.toString()); logger.debug("principal : " + principal); logger.debug("details : " + details.toString()); logger.debug("username : " + user.. 더보기 Spring Security가 Session에 넣은 내용들 1. 확인 방법 @RequestMapping("/account/home.do") public void accountHome(HttpServletRequest request) { HttpSession session = request.getSession(); Enumeration attributeNames = session.getAttributeNames(); while (attributeNames.hasMoreElements()) { String name = (String) attributeNames.nextElement(); if (name.equals("SPRING_SECURITY_CONTEXT")) { SecurityContext value = (SecurityContext) session.getAt.. 더보기 게시판 Paging Source Code http://javastore.tistory.com/64 --> 쫗네요 더보기 Custom Tag 함수 호출순서 doStartTag() -> { setBodyContent() -> doInitBody() -> doAfterBody() } -> doEndTag() -> release() 로직이 들어가는 자바 클래스 package benitware.sample.test; import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspWriter; import javax.servlet.jsp.tagext.TagSupport; @SuppressWarnings("serial") public class CustomTagEx extends TagSupport { private Long value; public void setValue(Long value) .. 더보기 이전 1 ··· 4 5 6 7 8 9 10 ··· 12 다음