타임리프 오류

William Parker·2022년 12월 9일

타임리프로 form 작성시

<form th:action="@{'/api/blog/delete/' + ${id}}" method="post">
    <input type="hidden" name="_method" value="delete"/>

이런식으로 적으면 오류 발생 -> 스프링 application에 @Bean추가

@Bean
public HiddenHttpMethodFilter hiddenHttpMethodFilter(){
	return new HiddenHttpMethodFilter();
}

빈생성자를 만드는 방법을 스프링이 모름 @NoArgsConstructor 선언해주면 해결됨.

cannot deserialize from object value (no delegate- or property-based creator)

어떤 값을 Response 할때 @Getter가 없어서 발생하는 에러

org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation

https://velog.io/@yuns8708/%EA%B2%8C%EC%8B%9C%ED%8C%90-%EA%B8%B0%EB%B3%B8-CRUD-%EB%A7%8C%EB%93%A4%EA%B8%B0

profile
Developer who does not give up and keeps on going.

0개의 댓글