본문 바로가기
반응형

Tips/Spring Boot6

[Spring Boot] WebSecurityConfigurerAdapter Deprecated 해결하기 WebSecurityConfigurerAdapter Deprecated 해결하기 새로 프로젝트를 만들고 이전처럼 WebSecurityConfigurerAdapter 클래스를 상속받아 SecurityConfig 클래스를 만들었는데 아래와 같은 경고가 발생했다. 'org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter' is deprecated 공식 문서를 찾아보니 아래와 같이 설명되어있는 것을 확인할 수 있었다. In Spring Security 5.7.0-M2 we deprecated the WebSecurityConfigurerAdapter, as we encourage users to mo.. 2022. 11. 15.
[Spring Boot] Process 'Gradle Test Executor 1' finished with non-zero exit value 1 해결법 Intro 기존 환경에선 개발이 잘 되다가 새로운 환경에서 개발을 진행하니 빌드는 잘 되는데, 테스트 시 아래의 에러가 뜨며 진행히 되지 않았다. Process 'Gradle Test Executor X' finished with non-zero exit value 1 Could not write standard input to Gradle Test Executor X. java.io.IOException: 파이프가 닫히는 중입니다 해결법 [Settings (Ctrl + Alt + S)] - [Build, Execution, Deployment] - [Gradle]로 이동한다. Gradle user home의 경로 중 한글이 포함되면 안된다. 경로를 변경하고 확인 버튼을 누르면 해당 경로에 Gradle .. 2022. 10. 30.
[Spring Boot] @DataJpaTest에서 JPAQueryFactory Bean 등록 안될때 @DataJpaTest에서 JPAQueryFactory Bean 등록 안될때 @DataJpaTest는 @SpringBootTest와 달리 Entity와 SpringDataJpa 관련 Bean만 등록해주기 때문에, QueryDSL에서 사용하는 JPAQueryFactory Bean은 등록되지 않는다. 때문에 테스트를 실행하면 아래와 같이 JPAQueryFactory Bean을 찾을 수 없다는 에러가 뜬다. Failed to load ApplicationContext java.lang.IllegalStateException: Failed to load ApplicationContext ... Caused by: org.springframework.beans.factory.UnsatisfiedDependency.. 2022. 10. 27.
[Spring Boot] OSIV (Open Session In View) 비활성화 후 JPA 조회 안될 때 OSIV (Open Session In View) 비활성화 후 JPA 조회 안될 때 기존에 잘 돌아가던 코드에서 OSIV를 비활성화하고 다시 돌려보니 아래와 같은 에러가 나며 Entity 조회가 되지 않았다. Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.orm.jpa.JpaSystemException: could not advance using next(); nested exception is org.hibernate.exception.GenericJDBCExceptio.. 2022. 9. 21.
[Spring] 빌드 시 invalid source release: XX 뜰 때 Intro 프로젝트가 잘 돌아가다가 다른 개발환경에서 다시 빌드하려 하면 위와 같은 에러가 뜨며 빌드가 되지 않을 때가 있다. 생각보다 이 문제가 자주 발생해서 해결방법을 정리해두려고 한다. [Project Structure (Ctrl + Alt + Shift + S)] - [Project Settings] - [Project] Project SDK를 Project language level에 맞게 변경한다. [Settings (Ctrl + Alt + S)] - [Build, Execution, Deployment] - [Build Tools] - [Gradle] Gradle JVM을 JAVA 버전에 맞게 변경한다. 여태껏 발생한 에러들은 위의 2가지 설정을 맞춰주는것 만으로도 다 해결되었다. 만약 위의.. 2022. 8. 31.
[Spring Boot] Infinite recursion (StackOverflowError) 오류 날 때 Intro Spring Repository에서 객체를 조회하는 도중에 아래의 에러가 발생했다. 2022-02-23 10:44:22.914 ERROR 58164 --- [nio-8080-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: Infinite recursion .. 2022. 2. 23.
반응형