화면에서 넘어오는 객체 매핑을 못하는것 같다.

화면의 기간날짜 폼 데이터를 문자열로 받아오는 과정에서 setter를 재정의 하여 

시작일자, 종료일자 정보에 매핑하여 처리하려 했는데, 오류가 발생했다.

{"MAASLOG"="[2022-10-22 23:52:04][WARN ][http-nio-8082-exec-10][AbstractHandlerExceptionResolver.java:207][logException:Resolved [org.springframework.validation.BindException: org.springframework.validation.BeanPropertyBindingResult: 2 errors
Field error in object 'batchErrorCollectFormDto' on field 'endDttm': rejected value [null]; codes [typeMismatch.batchErrorCollectFormDto.endDttm,typeMismatch.endDttm,typeMismatch.java.lang.Long,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [batchErrorCollectFormDto.endDttm,endDttm]; arguments []; default message [endDttm]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Long' for property 'endDttm'; nested exception is java.lang.NumberFormatException: For input string: "null"]
Field error in object 'batchErrorCollectFormDto' on field 'startDttm': rejected value [null]; codes [typeMismatch.batchErrorCollectFormDto.startDttm,typeMismatch.startDttm,typeMismatch.java.lang.Long,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [batchErrorCollectFormDto.startDttm,startDttm]; arguments []; default message [startDttm]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Long' for property 'startDttm'; nested exception is java.lang.NumberFormatException: For input string: "null"]]]"}

 

Field error in object 'batchErrorCollectFormDto' on field 'endDttm': rejected value [null]; 
codes [typeMismatch.batchErrorCollectFormDto.endDttm,typeMismatch.endDttm,typeMismatch.java.lang.Long,typeMismatch]; 
arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [batchErrorCollectFormDto.endDttm,endDttm]; 
arguments []; 
default message [endDttm]]; 
default message [Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Long' for property 'endDttm'; 
nested exception is java.lang.NumberFormatException: For input string: "null"]

 

null이 들어왔다고 까인듯 하다.

그래, 이전 화면에서는 화면을 먼저 구성하느라 null 은 들어오지 않았던것 같다. 

테스트로 요청케이스를 만들거나, 다시 화면부터 작업해야겠다. 

 

https://noritersand.github.io/spring/spring-org-springframework-validation-bindexception/

 

[Spring] org.springframework.validation.BindException

띠용

noritersand.github.io

 


앞 글에서 여기까지 서비스가 정상적을 올라왔다면 아래와 같이 로그가 표시되었을 것이다.


[전체로그]




[ 톰켓로그-1 ]


Spring WebApplicationContext ]



Spring 'action' Framework Servlet 초기화]



[ Application 로그 ]



'back > egovframework' 카테고리의 다른 글

3-1.sample 프로젝트를 만들어보자  (0) 2016.03.03

1. sample 프로젝트 생성

  - 퍼스팩트바(*) : eGovFrame 으로 선택 (eGovFrame 메뉴를 활성화 한다.)


  - eGovFrame 메뉴 > Start > New Web Project  


 - New eGovFrame Web Project 프로젝트 생성 마법 창에 Project Name을 입력하고 Next (Finish 하지 말고!)
   (Next를 하지 않고 그냥 Finish를 하면 게시판 소스가 생성되지 않은 빈 프로젝트가 생성됨)

   * ex01.sample 과 같이 프로젝트 명에 [.]이 포함되면 [.]을 기준으로 Group Id와 Artifact Id가 자동 등록됨


 - Generate Example 항목을 체크하면 Files영역에 자동생성될 리소스가 표시됨 > 드디어 Finish


- 생성프로젝트 소스구조


                  









 - 서비스 구동






[comment]

* 퍼스팩트바 : 이클립스의 작업창을 이루고 있는 '퍼스팩트 창'들의 모양을 유지하도록 관리해주는 일종의 그룹

* 퍼스팩트창 : 이클립스에서 작업을 할 수 있도록 제공하는 영역 (예 - Package Explorer, Console, Outline 등)




'back > egovframework' 카테고리의 다른 글

3-2.sample 프로젝트를 로그를 살펴보자  (0) 2016.03.04

+ Recent posts