[Error]
Failed to convert value of type 'java.lang.String' to required type 'java.util.Date'
: Date 타입을 (jsp페이지에서) 파라미터로 받아올때
@RequestMapping(value="/fetch" , method=RequestMethod.GET)
public @ResponseBody String fetchResult(@RequestParam("from") @DateTimeFormat(pattern="yyyy-MM-dd") Date fromDate) {
//Content goes here
}
Yes, it's simple. Just add the DateTimeFormat annotation.
'Spring > Problems' 카테고리의 다른 글
No qualifying bean of type ~ (0) | 2019.08.19 |
---|---|
[Error]스프링 프로젝트명에 빨간 엑스박스가 뜨는 경우 (0) | 2019.07.22 |
[Error] must override a superclass method (0) | 2019.06.23 |
Tomcat version 8.5 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5, 6, and 7 Web modules (0) | 2019.06.04 |
[Error] 클래스 로딩 문제 자료 링크 (0) | 2019.06.03 |