Caused by: java.lang.NoSuchMethodException: dev.practice.order.interfaces.order.OrderDto$RegisterOrderItem.<init>()
at java.base/java.lang.Class.getConstructor0(Class.java:3517)
at java.base/java.lang.Class.getDeclaredConstructor(Class.java:2691)
at org.springframework.beans.AbstractNestablePropertyAccessor.newValue(AbstractNestablePropertyAccessor.java:914)
... 59 common frames omitted
위 에러를 만나게 되는데 @ModelAttribute 하는 곳에 기본 생성자가 없는 경우 발생한다.
파리미터가 없는 빈 생성자를 만들거나 lombok을 사용한다면 @NoArgsConstructor 넣어주자.
'Java && Spring' 카테고리의 다른 글
스프링 시큐리티 Mysql용 session 테이블 생성 쿼리 (0) | 2022.06.29 |
---|---|
[Thymeleaf] nested list에서 input의 th:field 와 th:value 이슈 (0) | 2022.06.27 |
thymeleaf input에 default value 적용 안되는 현상 (0) | 2022.06.20 |
Neither BindingResult nor plain target object for bean name 'partner' available as request attribute (0) | 2022.06.14 |
The authentication type 10 is not supported (0) | 2021.11.24 |