1. @RequestMapping 에 java.util.Date 받기.
http://linkedjava.blogspot.com/2011/06/spring-controller-with-date-object.html
2. JacksonMappper 에서 java.util.Date Serialize 하기
http://linkedjava.blogspot.com/2011/06/spring-controller-with-date-object.html
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
@Test(expected=IndexOutOfBoundsException.class) public void verifyZipCodeGroupException() throws Exception{ Matcher mtcher = this.pattern.matcher("22101-5051"); boolean isValid = mtcher.matches(); mtcher.group(2); }
SimpleDateFormat ts= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Long time = ts.parse("2007-05-16 13:12:18").getTime();
java.sql.Date date = new java.sql.Date(time);
SimpleDateFormat ts= new SimpleDateFormat("yyyyMMddHHmmss");
return ts.format(date);
package a;
public class A extends B {}
package b;
abstract class B {}
B cannot be resolved as a type
참고로, protected 는 class 에는 붙힐 수 없고, memeber variable에만 적용됩니다. ㅎ
<error-page>
<error-code>404</error-code>
<location>/error/400.html</location>
</error-page>
등등등 상황별로 Error Page를 설정이 가능하다.
자세한 내용은 Oracle 홈페이지 를 참조 한다 :)
http://download.oracle.com/docs/cd/E13222_01/wls/docs81/webapp/web_xml.html#1017571
@RequestMapping(value = "/mywebapp/index.nhn", method = RequestMethod.GET)
public Model index(@ModelAttribute("searchItem") SearchItem searchItem, Model result,
HttpServletRequest request, HttpServletResponse response) throws Exception {
.....
throw new NoSuchRequestHandlingMethodException(request);
}
Calendar cal = Calendar.getInstance();
cal.set(Calendar.HOUR,hour);
cal.set(Calendar.MINUTE,min);
cal.set(Calendar.SECOND,0);
cal.set(Calendar.MILLISECOND, 0);
Date expectedDate = cal.getTime();
cal.setTime(new Date());