본문 바로가기
728x90

오류를 개발새발47

Request processing failed; nested exception is org.springframework.mail.MailSendException: Failed to close server connection after message failures; nested exception is javax.mail.MessagingException: Can't send command to SMTP host; 가입 인증 메일을 보내는 기능을 만드는데 메일이 발송되지 않는 오류가 발생했다 나는 네이버 메일을 쓰고 있었는데 아마 뭔가 설정이 잘못된 거 같아서 쳐보니 spring.mail.username=아이디@naver.com 네이버는 네이버아이디@naver.com 이렇게 이메일 주소를 완전히 붙여줘야 잘 돌아간다고 한다... 전에 했던 건 안 붙여도 잘 됐는데 이번엔 또 붙여야만 되는 거니..? 2023. 1. 16.
Caused by: org.apache.ibatis.type.TypeException: Error setting null for parameter #8 with JdbcType OTHER . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.SQLException: 부적합.. MyBatis를 사용하다가 오류가 났다.. Caused by: org.apache.ibatis.type.TypeException: Error setting null for parameter #8 with JdbcType OTHER . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.SQLException: 부적합한 열 유형: 1111 INSERT INTO USERS ( ID, USER_ID, PASSWORD, EMAIL, TEL, NAME, WHERES, ROLE, JOIN_DATE, LAST_LOGIN, BUSINESS_ID ) VA.. 2023. 1. 15.
Header 에 Authorization 이 안 뜨는 현상...인데...하.... jwt 토큰 개발 중, 나는 정상적으로 로그인을 했으나 헤더에 Authorization 이 뜨지 않는 현상이 발생했다 그리고 권한이 url로 가면 403 에러(권한 없음)가 뜬다.... @Override protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain, Authentication authResult) throws IOException, ServletException { System.out.println("successfulAuthentication 실행 됐으니 로그인 인증이 완료됐네요"); // authResult 객체로 jwt 토큰을 만들자 ! .. 2023. 1. 11.
카카오 로그인 class java.lang.Long cannot be cast to class java.lang.String (java.lang.Long and java.lang.String are in module java.base of loader 'bootstrap') 카카오 로그인 구현 중 provideId 를 가져오려고 하니 class java.lang.Long cannot be cast to class java.lang.String (java.lang.Long and java.lang.String are in module java.base of loader 'bootstrap') 해당 오류가 발생했다 ㅡ.ㅡ 카카오 PK(provide Id) 가 Long 타입이어서 그렇다 Long 타입은 String으로 바로 타입 캐스팅이 되지 않는 모양이다 @Override public String getProviderId() { return String.valueOf(attributes.get("id")); } toString() 대신 String.valueOf() 를 써주니까.. 2023. 1. 9.
The dependencies of some of the beans in the application context form a cycle 스프링 시큐리티 강좌를 보는데 순환 참조 에러가 발생했다.... (무한으로 사이클 돌려서 서로 참조) SecurityConfig.class @Configuration @EnableWebSecurity // 스프링 시큐리티 필터가 스프링 필터 체인에 등록 @RequiredArgsConstructor /** * secured * preAuthorize(postAuthorize) * 메소드에 직접 권한 걸기 true */ @EnableGlobalMethodSecurity(securedEnabled = true, prePostEnabled = true) public class SecurityConfig extends WebSecurityConfigurerAdapter { private final Principa.. 2023. 1. 9.
Cannot invoke "org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.encode(java.lang.CharSequence)" because "this.passwordEncoder" is null 인강을 듣고 따라해보고있는데 Cannot invoke "org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.encode(java.lang.CharSequence)" because "this.passwordEncoder" is null 해당 오류가 발생했다 이리저리 만져보니 bean이 제대로 주입 안 된 모양이었다 (Repository도 불러오지 못하더라....빈 등록이 안 됐다고 ㅠㅠ) 1.메인애플리케이션에 제대로 import 되어있는지 확인 2.생성자 주입 3.컨트롤러에 @EnableAutoConfiguration . . . 그러다가 @EnableJpaRepository("패키지경로") 를 명시해줬는데 repository 패키지 경로에 빨.. 2023. 1. 8.
728x90