목록Spring/Trouble Shooting (6)
개발 공부 기록

🚨 문제 발생 JWT를 발급 및 검증하는 JwtTokenizer을 구현하던 중 위와 같은 에러가 발생하였습니다. 🔨 문제 해결 //수정 전 import lombok.Value; 상단의 Value의 import문을 확인하여 위와 같이 되어있다면 아래처럼 수정합니다. //수정 후 import org.springframework.beans.factory.annotation.Value;

🚨 문제 발생 Resolved [org.springframework.http.converter.HttpMessageConversionException: Type definition error: [simple type, class cohttp://m.bobjeong.user.dto.request.SignupRequestDto]] 로컬 서버에 회원가입 요청을 보냈더니 위와 같은 메세지가 발생하면서 400 런타임 오류가 발생하였습니다. 💡 문제 원인 @Data @AllArgsConstructor @Builder public class SignupRequestDto { 기존 코드입니다. 보시다시피 @NoArgsConstructor 어노테이션이 존재하지 않는데, JSON을 Request Dto 객체로 바인딩할 때..

🚨 문제 발생 간단히 구현한 회원가입 로직을 테스트하기 위해 Postman을 이용하였습니다. 이때 제가 보낸 Post 요청에서 403 Forbidden 에러가 발생하였습니다. 💡 문제 원인 @Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { return http .csrf(AbstractHttpConfigurer::disable) .cors(AbstractHttpConfigurer::disable) .sessionManagement(httpSecuritySessionManagementConfigurer -> { httpSecuritySessionManagementConfigurer .sessionCreatio..

🚨 문제 발생 Postman을 통해 로컬로 api 요청을 보내던 중 Invalid character found in method name 에러가 발생하였습니다. 💡 문제 원인 일반적으로 HTTPS 요청이 SSL/TLS 연결을 필요로 하므로, 제가 보낸 HTTPS 요청이 서버에서 올바르게 해석되지 못하는 상황이라는 것을 알 수 있었습니다. 로컬 환경에서 HTTPS가 활성화되지 않았기에 에러가 발생하였습니다. 🔨 문제 해결 https를 http로 변경하여 다시 요청을 보냅니다.

Build Tool - Gradle Language - JAVA 11 SpringBoot Version - 3.1.3 Packaging - jar Dependencies - Spring Web start.spring.io를 통해 위와 같은 설정으로 프로젝트를 생성한 후 빌드를 하였더니 아래와 같은 에러가 발생하였습니다. 원인은 JAVA와 Gradle의 버전 충돌이였습니다. 공식 문서를 찾아봤더니 SpringBoot 버전에 맞는 JAVA 버전을 사용해야 한다는 걸 알게 되었습니다. SpringBoot 3.x 버전부터는 JAVA 17 이상을 사용하고, SpringBoot 2.x 버전은 JAVA 11을 사용하는 것을 추천드립니다. 저의 경우에는 SpringBoot 버전은 3.1.3에 JAVA 11을 사용하고 ..

🚨 문제 발생 더보기 A problem occurred configuring root project 'project_name'. > Could not resolve all files for configuration ':classpath'. > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.1.2. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.1.2 > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.1.2 was found..