728x90 오류를 개발새발47 Could not find class file for 'today.also.hyuil.domain.member.Qclass' QueryDsl 을 세팅하는데 해당 오류가 발생했다 Could not find class file for 'today.also.hyuil.domain.member.Qclass' Q클래스를 못 찾는다는 뜻인데 인터넷에 돌아다니는 gradle clean 후 bulid (compileJava) 등을 해보아도 해결되지 않았다 해결은 내 프로젝트는 깃으로 관리하고 있는데 ignore 하면서 몇개의 폴더가 빌드 폴더(?)에 포함되어있지 않았던 것이다... 인텔리제이 - Project Structuer... 에서 해당 폴더 excluded 를 풀어주니 해당 폴더가 보이고 정상적으로 Q클래스가 import 됨을 알 수 있다....^0^/ 오늘 몇 시간 허공에 날려버리기!~ 2023. 3. 11. MyBatis ) 마이바티스 필드 매핑이 안 되는 현상 @Override public UsersVo login(UsersVo usersVo) { map.put("userId", usersVo.getUserId()); UsersVo user = usersMapper.findByUserId(map); if (user == null) { throw new RuntimeException("유저가없음 아이디"); } boolean passMatches = passwordEncoder.matches(usersVo.getPassword(), user.getPassword()); if (!passMatches) { throw new RuntimeException("유저가없음 패스워드"); } return user; } 해당 메서드에서 UsersVo 의 userId 값이 들.. 2023. 1. 28. Spring Security 에서 web.ignoring()을 해도 정적 파일을 필터링해요 ㅠ Spring Security 를 구현하다가 얘가 정적 파일도 계속 필터링 하는 것을 발견했다 ㅡㅜ 한번에 필터가 겁내 여러개 돌았다.. @Override public void configure(WebSecurity web) throws Exception { web.ignoring() // 정적파일들 필터 검사 ㄴㄴ .requestMatchers(PathRequest.toStaticResources().atCommonLocations()); } 이런 식으로 Path.Request.toStaticResources().atCommonLocation() 으로 스태틱 파일 경로를 enum(css, js 등 별게 다 있다)으로 해줬는데도 요런 일이 발생했다 참고로 요런 enum 들이 있다 근데 저렇게 설정해줘도, .. 2023. 1. 19. JWT String argument cannot be null or empty 어느 페이지를 가던 JWT 토큰이 널이면 안 된다는 오류가 발생했다 jwt 관련 설정을 다 만들어놓고나니 index페이지에서도 jwt토큰을 요구하는 것이어따... 해답은 좀 간단했다ㅎㅎ; 원래 addFilter로 걍 모든 작업에 해당 jwt 검증 필터가 등록하게 만들어버렷엇던것... @Override protected void configure(final HttpSecurity http) throws Exception { http.csrf().disable() .sessionManagement() .sessionCreationPolicy(SessionCreationPolicy.STATELESS) .and() .httpBasic() .disable() .addFilter(new JwtAuthorizatio.. 2023. 1. 18. @Value 관련 java.lang.NullPointerException: null jwtTokenProvider 라는 jwt토큰을 만드는 클래스에서 @Value(${}) 값이 null이 뜨는 참사가 발생했다 @Slf4j public class JwtTokenProvider { @Value("${jwt.secret.key}") private String secretKey; @Value("${jwt.token.validity-in-seconds}") private Long validTime; public String createAccessToken(Authentication authentication) { log.info("크리에이트엑세스토큰시작"); log.info("키내놔 = {}", secretKey); log.info("시간내노ㅓ = {}", validTime); //... 이렇게.. 2023. 1. 18. The dependencies of some of the beans in the application context form a cycle 빈 순환참조 오류가 발생했다 ㅡ.ㅡ SecurityConfig 가 UsersService 를 참조하는데 UsersService를 사용하려면 SecurityConfig를 참조해야하는 무한의 굴레~ 내가 UsersService 를 @Service 로만 임의 등록해서 이런 일이 발생하는 거 같았다 (SecurityConfig 구현 전에는 잘 돌아갔음) 하지만 SecurityConfig 에서는 반드시 UsersService를 사용해야하기 때문에 그냥 UsersService 를 명시적으로 빈으로 등록해쥬기로했당,,ㅎㅎ!! 맨 처음에는 @Service 애너테이션으로만 자동 빈등록을 해놨었고 SecurityConfig에서 사용하려고 한 후로는 이런 식으로 등록해놓고 이렇게 사용하려고 했는데 순환 참조 오류 발생!! .. 2023. 1. 17. 이전 1 2 3 4 5 6 7 8 다음 728x90