Framework 82

[Error] org.springframework.beans.factory.UnsatisfiedDependencyException

스프링 버전이 낮아서 2.5.2로 바꿨더니 서버 실행하면 아래 에러가 뜨면서 중단됨.. org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Unsatisfied dependency expressed through method 'entityManagerFactory' parameter 0;nested exception is org.springfram..

[Error] "Request method 'GET' not supported"

게시글 삭제 버튼을 클릭하면 "Request method 'GET' not supported"가 떴다. @DeleteMapping을 사용하려고 했는데 이런 에러가 떴다. @GetMapping으로 바꾸면 에러가 사라지지만, @DeleteMapping을 쓰고 싶어서 방법을 찾아봤다. spring.mvc.hiddenmethod.filter.enabled=true application.properties에 추가한다. // 삭제 @DeleteMapping("/post/delete/{id}") public String delete(@PathVariable("id") Long id) { postService.deletePost(id); return "redirect:/"; } 컨트롤러 삭제 th:method="del..

[Error] Request method 'POST' not supported

DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported] 수정 기능 구현할 때 컨트롤러에서 mapping 방식을 post에서 put으로 바꿨더니 이런 에러가 생겼다. post는 생성, put은 수정할 때 쓰인다고 한다. post는 멱등성이 없어서 같은 값을 여러 번 보내면 해당 값이 수정되는 것이 아니다. 새롭게 추가되어 여러 개가 생긴다 .. 🍯 해결 spring.mvc.hiddenmethod.filter.enabled=true 이 코드를 application.properties에 추가해줌 @Bean p..

[Error] Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefF..

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/JAXBE..

[Error] javax.net.ssl.SSLException

spring.datasource.url=jdbc:mysql://localhost:3306?&useSSL=false application.properties에서 위와 같이 수정 출처: https://kikikimoong.tistory.com/entry/SpringBoot-Closing-inbound-before-receiving-peers-closenotify-예외-없애기 [SpringBoot] Closing inbound before receiving peer's close_notify 예외 없애기 ** BEGIN NESTED EXCEPTION ** javax.net.ssl.SSLException MESSAGE: closing inbound before receiving peer's close_notif..

[error] Thymeleaf Exception processing template

Exception processing template "post/createPostForm": Exception parsing document: template="post/createPostForm", line 10 - column 11 🎁 해결방법 1. input 또는 meta에서 마지막에 /를 썼는지 확인하자 참고 👉 https://stackoverflow.com/questions/48327528/thymeleaf-exception-parsing-document-in-spring Thymeleaf Exception parsing document in Spring Error message reads: There was an unexpected error (type=Internal Server Error..

lombok 사용

lombok을 의존성에 추가하는 방법은 2가지다. 참고 👉 https://projectlombok.org/setup/gradle 1. plugin plugins { id "io.freefair.lombok" version "6.6.1" } 2. 컴파일 중에만 lombok을 추가하도록 compileOnly scope 사용 repositories { mavenCentral() } dependencies { compileOnly 'org.projectlombok:lombok:1.18.24' annotationProcessor 'org.projectlombok:lombok:1.18.24' testCompileOnly 'org.projectlombok:lombok:1.18.24' testAnnotationProc..