스프링부트 (2) 썸네일형 리스트형 [Spring/IntelliJ] This generated password is for development use only. Your security configuration must be updated before running your application in production. 오류 해결 Spring Security 스프링 시큐리티를 적용한 프로젝트 진행 중 빌드도 잘되고 런도 되는데 Postman에서 다른 api를 테스트 하려고 하면 아무 결과값이 나오지 않고 해당 문구가 떴다. 찾아보니 build.gradle에 시큐리티 관련한 implements들 때문에 자동으로 적용되어 그런 것이었고, 나는 아직 시큐리티 모듈을 만들어만 놓고 다른 브랜치에서 관리하고 있었기 때문에 필요가 없었다. 그래서 우선은 다 주석 처리 해놓고 돌렸더니 api 테스트가 잘 되는 걸 확인할 수 있었다. //security //implementation 'org.springframework.boot:spring-boot-starter-security' //implementation 'org.springframewo.. [Spring/JPA] Request processing failed; nested exception is java.lang.NullPointerException 오류 해결 이 오류는 서버가 해당 요청을 충족시키지 못하게 하는 예기치 않은 조건을 맞닥뜨렸을 때 나타난다. 예기치 않은 조건에는 수많은 것들이 있기 때문에 로그에 찍힌 root cause를 보고 어떤 코드에서 생긴 오류인지 알아내야 한다. 나의 경우에는 Controller에서 Service의 특정 함수를 호출하는 곳에서 오류가 난 것으로 보였다. - 오류난 코드 결론적으로는 호출한 service를 private으로 정의해서 생긴 문제였다. private을 private final로 수정하였더니 오류가 해결되었다. //수정 전 private FollowService followService; //수정 후 private final FollowService followService; 이전 1 다음