티스토리 뷰

JAVA

오류코드 [ Field error in object ]

KIMSG 2017. 7. 21. 14:31

1
2
3
Field error in object 'attachFile' on field 'fileNm': rejected value [org.springframework.web.multipart.commons.CommonsMultipartFile@6aefa836];
 
Field error in object 'attachFile' on field 'fileNm': rejected value [org.springframework.web.multipart.commons.CommonsMultipartFile@7a4a0c66]; 
codes [typeMismatch.attachFile.fileNm,typeMismatch.fileNm,typeMismatch.java.lang.String,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [attachFile.fileNm,fileNm]; arguments []; default message [fileNm]]; default message [Failed to convert property value of type 'org.springframework.web.multipart.commons.CommonsMultipartFile' to required type 'java.lang.String' for property 'fileNm'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.springframework.web.multipart.commons.CommonsMultipartFile] to required type [java.lang.Stringfor property 'fileNm': no matching editors or conversion strategy found]
cs




이런 오류가 나면.....
VO 객체를 잘봐야함.

필드와 맞지 않는 데이터형일 경우가 많음..... 나는 그랬음....


'JAVA' 카테고리의 다른 글

for each 문  (0) 2017.07.21
list에서 원하는 값 뽑아오기....  (0) 2017.07.21
파일 업로드 관련해서 주의  (0) 2017.07.21
자바 문자열 뒤에서 3자리 문자열 가져오기  (0) 2017.07.21
Ambiguous 오류가 났다.  (0) 2017.07.21
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/09   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함
반응형