무료
다른 수강생들이 자주 물어보는 질문이 궁금하신가요?
- 미해결Spring Boot JWT Tutorial
머이렇게 안되는게많노 ㅠ
ㅠ...
- 미해결Spring Boot JWT Tutorial
스프링부트 3.x 버전 data.sql 삽입 오류 발생할 경우 해결 방법
버전 정보스프링 부트 3.2.4자바 17H2 1.4https://ondj.tistory.com/164data.sql이 아니라 import.sql로 파일명 변경하시면 동작합니다.
- 미해결Spring Boot JWT Tutorial
postman 결과가 다릅니다
1강에서 강사님께서 하신 결과는 아래와 같이 나오는데제 결과는 아래와 같이 body 부분이 비어서 나옵니다postman 설정문제인걸까요? 401 unauthorized라고 로그가 뜨긴하는거 같은데 json 데이터로 나오지가 않습니다.
- 미해결Spring Boot JWT Tutorial
body값이 비었습니다.
안녕하세요.저는 8080포트를 다른 프로젝트에 사용하고 있어서 8082포트를 사용합니다.아래와 같이 GET 요청을 보냈는데, 401 unauthorized는 확인되나 Body값에는 아무런 값이 나오지 않습니다.
- 미해결Spring Boot JWT Tutorial
jjwt 버전을 올렸더니 jwt가 유효하지 않다고 합니다
강의 예제를 보면 springboot 3.2.0 버전이고 java도 17버전으로 기준하여 작성된 것 같습니다.제 jdk 환경도 17버전이고요. cmd 창에서 java -version으로 확인도 했습니다.내려받아 돌려보면 잘 작동합니다. 그런데 jjwt 0.11.5 버전이 아닌 jjwt 0.12.3 버전을 사용해보고 싶어서 코드를 일부 수정했습니다.또한 Bcrypt알고리즘이 이제는 더 이상 안전하지 않다는 얘길 들어서 Argon2 알고리즘을 사용해보고자 했습니다.dependency에 jjwt 0.12.3 버전으로 변경하였고Jwts 이하 메서드가 jjwt에서는 바뀌어서 key에 타입을 명시해주어야 했습니다.PostMan에서 JWT Bearer로 설정하고 encode체크를 하지 않은 채로(이미되어있으니) HS512알고리즘으로 Secret을 입력하고 localhost:8080/api/authenticate 로 요청을 보내봤습니다.{"username": "user","password", "user"}하지만 jjwt 0.11.5 버전일 때는 잘 오던 token 내용이 500error를 내면서 토큰이 유효하지 않다고 합니다;제 코드에서 잘못 한 점이 있을까요? P.S 스스로 gradle refresh, clean build 등을 한 후에 테스트해본 결과jjwt 0.12.3은 0.11.5와 vscode의 REST Client로 api 테스트 시에 강의와 동일한 결과를 보여주었습니다. 그러나 Argon2 알고리즘을 사용하여 생성한 비밀번호를 사용하면 엉뚱하게도 jwt토큰이 유효하지 않다며 401 에러가 났습니다. 강의대로 Bcrypt 알고리즘을 쓰면 없는 일입니다...다만 이런 오류를 내는 연관성을 모르겠습니다 ;; package com.gyull.jwt.jwt; import static org.junit.jupiter.api.Assertions.assertTrue; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.security.crypto.argon2.Argon2PasswordEncoder; import org.springframework.security.crypto.keygen.BytesKeyGenerator; @ExtendWith(MockitoExtension.class) @SpringBootTest class JwtApplicationTests { private static final Logger logger = LoggerFactory.getLogger(JwtApplicationTests.class); @Mock private BytesKeyGenerator keyGeneratorMock; private Argon2PasswordEncoder encoder = Argon2PasswordEncoder.defaultsForSpringSecurity_v5_8(); @Test void contextLoads() { } //argon2알고리즘으로 비밀번호를 생성하기 위해 테스트를 했습니다 //data.sql로 table에 insert하기 위함. @Test public void encodeWhenEqualPasswordWithCustomParamsThenMatches() { encoder = new Argon2PasswordEncoder(16, 32, 4, 65536, 3); String result = encoder.encode("admin"); logger.info("인코딩완료: "+result); assertTrue(encoder.matches("admin", result)); } } package com.gyull.jwt.jwt.security.config; import org.springframework.boot.autoconfigure.security.servlet.PathRequest; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.Customizer; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configurers.HeadersConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.crypto.argon2.Argon2PasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.security.web.SecurityFilterChain; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; import org.springframework.web.filter.CorsFilter; import com.gyull.jwt.jwt.security.filter.JwtFilter; import com.gyull.jwt.jwt.security.filter.JwtSecurityConfig; import com.gyull.jwt.jwt.security.handler.JwtAccessDeniedHandler; import com.gyull.jwt.jwt.security.handler.JwtAuthenticationEntryPoint; import com.gyull.jwt.jwt.security.provider.TokenProvider; import lombok.RequiredArgsConstructor; @Configuration @EnableWebSecurity @RequiredArgsConstructor public class SecurityConfig { private final TokenProvider tokenProvider; private final JwtAuthenticationEntryPoint jwtAuthenticationEntryPoint; private final JwtAccessDeniedHandler jwtAccessDeniedHandler; private final CorsFilter corsFilter; //Bcrypt 알고리즘은 예제 연습할 때는 쓰지만 연산속도가 발전한 지금은 //취약점이 있기 때문에 Argon2를 비롯한 대체 알고리즘을 더 권장하고 있다. @Bean public PasswordEncoder passwordEncoder(){ return new Argon2PasswordEncoder(16, 32, 4, 65536, 3); } //Spring Security 6.1.x 버전부터는 Lambda DSL의 사용으로 .and()와 같은 메서드가 불필요하다 //Spring Security 7을 염두로 두고 deprecated, removal 되는 메서드가 무척 많았다 @Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http .csrf((csrf) -> csrf.disable()) // .addFilterBefore(corsFilter, UsernamePasswordAuthenticationFilter.class) .exceptionHandling((exceptionHandling) -> exceptionHandling .authenticationEntryPoint(jwtAuthenticationEntryPoint) .accessDeniedHandler(jwtAccessDeniedHandler) ) .headers(headers -> headers.frameOptions(frameOptions -> frameOptions.sameOrigin())) .sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) .authorizeHttpRequests( authorize -> authorize .requestMatchers("/").permitAll() .requestMatchers("/api/hello", "/api/authenticate", "/api/signup").permitAll() .requestMatchers("/admin/**").permitAll() .requestMatchers("/favicon.ico").permitAll() .requestMatchers(PathRequest.toH2Console()).permitAll() .anyRequest().authenticated() ) //Spring Security 6.2.0 javadoc에서는 .apply()메서드가 deprecated되었으니 .with()을 대신 쓰라고 되어있다. //다른 github 예제들은 jwtSecurityConfig를 따로 작성하지 않고 //addFilterBefore을 사용하여 직접 추가해주고 있는데, jwtSecurityConfig 또한 내부적으로 addFilterBefore을 사용해서 httpSecurity에 추가해줄 수도 있다. .with(new JwtSecurityConfig(tokenProvider), customizer -> {}); return http.build(); } } implementation group: 'io.jsonwebtoken', name: 'jjwt-api', version: '0.12.3' runtimeOnly group: 'io.jsonwebtoken', name: 'jjwt-impl', version: '0.12.3' runtimeOnly group: 'io.jsonwebtoken', name: 'jjwt-jackson', version: '0.12.3' import javax.crypto.SecretKey; //나머진 동일하여 생략 public String createToken(Authentication authentication){ String authorities = authentication.getAuthorities().stream() .map(GrantedAuthority::getAuthority) .collect(Collectors.joining(",")); long now = (new Date()).getTime(); Date validity = new Date(now + this.tokenValidityInMilliseconds); return Jwts.builder() .subject(authentication.getName()) .claim(AUTHORITIES_KEY, authorities) .signWith((SecretKey) key, Jwts.SIG.HS512) .expiration(validity) .compact(); } public Authentication getAuthentication(String token){ Claims claims = Jwts .parser() .verifyWith((SecretKey) key) .build() .parseSignedClaims(token) .getPayload(); Collection<? extends GrantedAuthority> authorities = Arrays.stream(claims.get(AUTHORITIES_KEY).toString().split(",")) .map(SimpleGrantedAuthority::new) .collect(Collectors.toList()); User principal = new User(claims.getSubject(), "", authorities); return new UsernamePasswordAuthenticationToken(principal, token, authorities); } public boolean validateToken(String token){ try { Jwts.parser().verifyWith((SecretKey) key).build().parseSignedClaims(token); return true; } catch(SecurityException | MalformedJwtException e){ logger.info("잘못된 JWT 서명입니다."); } catch(ExpiredJwtException e){ logger.info("만료된 JWT 토큰입니다."); } catch(UnsupportedJwtException e){ logger.info("지원되지 않는 JWT 토큰입니다."); } catch(IllegalArgumentException e){ logger.info("JWT 토큰이 잘못되었습니다."); } return false; }
- 미해결Spring Boot JWT Tutorial
Refresh Token
좋은 강의 감사합니다. Jwt 토큰에 대해서 공부하다 보니 Refresh Token에 대해 알게 되었습니다. 혹시 Refresh Token에 대해 찍은신 다른 강의나 참고할만한 코드가 따로 있을까요?! 그리고 해당 강의에서 구현한 jwt는 Refresh token 방식이 아니기 때문에 새로고침하거나 발급받은 후 페이지를 종료하게 되면 토큰은 사라지는 건가요?
- 미해결Spring Boot JWT Tutorial
유저 권한 설정
동영상 강의에서 하신대로 @ManyToMany @JoinTable( name = "user_authority", joinColumns = {@JoinColumn(name = "user_id", referencedColumnName = "user_id")}, inverseJoinColumns = {@JoinColumn(name = "authority_name", referencedColumnName = "authority_name")}) private Set<Authority> authorities; 이렇게 할 수 도 있는데 Enum타입으로 하는 방법도 있는것으로 알고있습니다.이렇게 했을 때 두개의 차이점은 뭘까요?! 장단점을 알고싶습니다.제가 생각했을 때는 알려주신 방법은 데이터베이스를 만들어야하니 조인문도 필요할 것 같고 그럼 쿼리가 많이 쌓이게 되면 부하도 커질 것 같고 하지만 한 유저가 여러개의 권한을 가질 수 있다는 장점?이 있을 것 같고제가 말한 enum타입은 쿼리문 작성은 단순해지는 반면 유저가 하나의 권한밖에 못 가지니 그건 상황에 따라 안좋을 수도 잇을 것 같네요 궁금해서 질문 남깁니다. 좋은 강의 감사합니다!!
- 해결됨Spring Boot JWT Tutorial
setAuthentication
안녕하세요JwtFilter 에서 StringUtils.hasText(jwt) && tokenProvider.validateToken(jwt)조건을 만족하면 아래와 같이 SecurityContextHolder.getContext().setAuthentication(authentication); 인증정보를 저장하는데 컨트롤러에서 또 인증정보를 저장하는건가요 ??정보를 그럼 총 2번 저장하는건가요??위 JwtFilter 에서 (StringUtils.hasText(jwt) && tokenProvider.validateToken(jwt)) 이조건이 만족했을떄
- 미해결Spring Boot JWT Tutorial
postman에서 오류가 납니다..
이전까지는 모든게 다 되는데 postman test에 전역 변수를 잡고 Authorization에 {{jwt_tutorial_token}}을 넣어서 send 해봐도 Something went wrong while running your scripts. Check Postman Console for more info 라는 작은 팝업창만 뜰 뿐, 아무런 반응이 없습니다...모든 코드와 postman에도 모두 동일하게 작성을 했는데, 왜 이런 오류가 발생하는지 알 수 있을까요..?ㅜㅜ
- 미해결Spring Boot JWT Tutorial
Spring boot 3.1.5 기준 학습 정리 파일 공유
2023년 11월 말 JWT학습 본 무료강의를 알게돼 학습했습니다. 학습중에 일부 메서드나 이나 라이브러리들이 deprecate 인 경우가 있어서 학습 중 정리한 markdown 파일 공유합니다 ㅎㅎ 소스도 같이 공유되어 있으니 학습시 참고하시면 좋을 것 같네요! https://github.com/gomshiki/jwtStudy/blob/main/studymarkdown/jwtProject_note.md
- 미해결Spring Boot JWT Tutorial
/api/hello에 접근이 안됩니다 ㅠㅠ
package NewYear.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityCustomizer; import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.web.SecurityFilterChain; import org.springframework.security.web.util.matcher.AntPathRequestMatcher; //기본적인 웹 보안을 활성화 하는 어노테이션 @Configuration @EnableWebSecurity @EnableMethodSecurity public class SecurityConfig { @Bean public WebSecurityCustomizer configure() { return (web) -> web.ignoring() .requestMatchers(new AntPathRequestMatcher("/h2-console/**")) .requestMatchers(new AntPathRequestMatcher("/favicon.ico")); } @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { return httpSecurity .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests((registry) -> registry.requestMatchers(new AntPathRequestMatcher("/api/hello")).permitAll() .anyRequest().authenticated() ) .build(); } } @EnableWebSecurity를 비활성화도 해보고 커뮤니티에 올라온 코드로 다 해봤는 데 접근이 401에러로 접근이 안되는 것 같습니다 ㅠㅠ 해결방안이 있을까요 스프링부트 버전은 3.2.0입니다
- 해결됨Spring Boot JWT Tutorial
mysql 설정로 실습시
# server port #spring.server.port=8080 # data base spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3307/데이터베이스이름?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Seoul&characterEncoding=UTF-8 spring.datasource.username=유저 spring.datasource.password=비밀번호 # thymeleaf spring.thymeleaf.cache=false spring.jpa.database=mysql spring.jpa.database-platform= org.hibernate.dialect.MySQL8Dialect # spring data jpa spring.jpa.properties.hibernate.dialect.storage_engine=innodb spring.jpa.show-sql=true spring.jpa.open-in-view=false spring.jpa.hibernate.ddl-auto=create spring.jpa.properties.hibernate.format_sql=true spring.jpa.properties.hibernate.show_sql=true spring.jpa.defer-datasource-initialization= true spring.sql.init.mode= always logging.level.org.silvernine=DEBUGplugins { id 'java' id 'org.springframework.boot' version '3.1.5' id 'io.spring.dependency-management' version '1.1.3' } group = 'NewYear' version = '0.0.1-SNAPSHOT' java { sourceCompatibility = '17' } configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'org.testng:testng:7.1.0' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.security:spring-security-test' implementation 'mysql:mysql-connector-java:8.0.29' // implementation group: 'mysql', name: 'mysql-connector-java', version: '8.0.29' runtimeOnly 'mysql:mysql-connector-java' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-starter-web' compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' } tasks.named('bootBuildImage') { builder = 'paketobuildpacks/builder-jammy-base:latest' } tasks.named('test') { useJUnitPlatform() } mysql에 정상적으로 connection이 되는 데 Entity에서 테이블 생성을 못하는 거 같습니다.따로 오류는 없고, 테이블이 생성이 안됩니다.data.sql에서 따로 테이블을 생성하는 구문을 넣으면 테이블과 컬럼값들이 제대로 들어가는 데 Entity에선 테이블을 자동으로 생성하지 못합니다.무엇이 문제일까요? ㅠㅠ
- 미해결Spring Boot JWT Tutorial
유효한 JWT 토큰이 없습니다
UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(signIn.userId(), registerUser(signIn.password())); Authentication authentication = authenticationManagerBuilder.getObject().authenticate(authenticationToken); SecurityContextHolder.getContext().setAuthentication(authentication); String jwt = tokenProvider.createToken(authentication); HttpHeaders httpHeaders = new HttpHeaders(); httpHeaders.add(JwtFilter.AUTHORIZATION_HEADER, "Bearer " + jwt); 위 코드에서 [authentication] 부분에 아래와 같은 오류가 발생합니다.org.springframework.security.authentication.BadCredentialsException: 자격 증명에 실패하였습니다. 어떻게 처리하면 되는지 잘 모르겠습니다... 이 문제에 대해 아시는 분들은 저에게 도움 부탁드립니다 ㅜㅜ
- 미해결Spring Boot JWT Tutorial
8:45 spring security 3.1.5 설정 방법 (버전 안 맞춰서 안될때)
spring security 3.1.5 버전 방식입니다.기존에 implement 하지 않고 클래스를 @configuration 해서구성 파일로 인식하게 만들고 해당 메서드를 @bean 을 주입시켜 사용하는 방식입니다.처음 참조할 부분은 여기를 참조 하시면 됩니다. 처음 설정 방법 :: 3.1.5 방법 1SecurityConfig::SecurityFilterChain 메서드를 수정하기 @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { httpSecurity .csrf(AbstractHttpConfigurer::disable) .exceptionHandling((handling) -> handling.authenticationEntryPoint(jwtAuthenticationEntryPoint) .accessDeniedHandler(jwtAccessDeniedHandler) ) .headers((header) -> header.frameOptions( HeadersConfigurer.FrameOptionsConfig::sameOrigin ) ) .authorizeHttpRequests((registry) -> registry.requestMatchers("/api/hello").permitAll() .requestMatchers("/api/authentication").permitAll() .requestMatchers("/api/signup").permitAll() .anyRequest().authenticated() ); return httpSecurity.build(); } 방법 2JwtSecurityConfig에 메서드를 하나 추가 한다. public HttpSecurity configureAndReturn(HttpSecurity httpSecurity) { httpSecurity.addFilterBefore( new JwtFilter(tokenProvider), UsernamePasswordAuthenticationFilter.class ); return httpSecurity; }SecurityConfig::SecurityFilterChain 메서드를 수정하기@Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { return new JwtSecurityConfig(tokenProvider).configureAndReturn( httpSecurity .csrf(AbstractHttpConfigurer::disable) .exceptionHandling((handling) -> handling.authenticationEntryPoint(jwtAuthenticationEntryPoint) .accessDeniedHandler(jwtAccessDeniedHandler) ) .headers((header) -> header.frameOptions( HeadersConfigurer.FrameOptionsConfig::sameOrigin ) ) .authorizeHttpRequests((registry) -> registry.requestMatchers("/api/hello").permitAll() .requestMatchers("/api/authentication").permitAll() .requestMatchers("/api/signup").permitAll() .anyRequest().authenticated() ) ).build(); } 개인적으로는 방법 1이 깔끔하다고 느낍니다.
- 미해결Spring Boot JWT Tutorial
2:00 에서 저처럼 버전 안 맞춰서 해서 헤매는 분들 이걸로 해보세요.
저처럼 버전 안 맞춰서 안되는 분들 이걸로 해결해보세요. 문서 참조해서 지원 중단된 방식은 제외하고 설정했습니다. @Configuration @EnableWebSecurity @EnableMethodSecurity public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { return httpSecurity .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests((registry) -> registry.requestMatchers("/api/hello").permitAll() .anyRequest().authenticated() ) .build(); } } 어노테이션에 꼭 @Configuration 이 들어가야 설정 파일로 인식해 제대로 작동합니다. 빼먹으시면 안됩니다.
- 미해결Spring Boot JWT Tutorial
JWT String argument cannot be null or empty.
계속 이런 오류가 발생하는 상황인데 어디가 문제인걸까요........2023-10-15 19:32:08.071 INFO 20572 --- [nio-8080-exec-2] c.newus.traders.user.jwt.TokenProvider : JWT claims string is empty. java.lang.IllegalArgumentException: JWT String argument cannot be null or empty. at io.jsonwebtoken.lang.Assert.hasText(Assert.java:132) ~[jjwt-api-0.11.5.jar:0.11.5] at io.jsonwebtoken.impl.DefaultJwtParser.parse(DefaultJwtParser.java:527) ~[jjwt-impl-0.11.5.jar:0.11.5] at io.jsonwebtoken.impl.DefaultJwtParser.parseClaimsJws(DefaultJwtParser.java:589) ~[jjwt-impl-0.11.5.jar:0.11.5] at io.jsonwebtoken.impl.ImmutableJwtParser.parseClaimsJws(ImmutableJwtParser.java:173) ~[jjwt-impl-0.11.5.jar:0.11.5] at com.newus.traders.user.jwt.TokenProvider.validateToken(TokenProvider.java:141) ~[main/:na] at com.newus.traders.user.jwt.JwtFilter.doFilterInternal(JwtFilter.java:40) [main/:na] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.29.jar:5.3.29] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) [spring-security-web-5.7.10.jar:5.7.10] at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91) [spring-web-5.3.29.jar:5.3.29] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.29.jar:5.3.29] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) [spring-security-web-5.7.10.jar:5.7.10] at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103) [spring-security-web-5.7.10.jar:5.7.10] at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89) [spring-security-web-5.7.10.jar:5.7.10] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) [spring-security-web-5.7.10.jar:5.7.10] at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90) [spring-security-web-5.7.10.jar:5.7.10] at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75) [spring-security-web-5.7.10.jar:5.7.10] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.29.jar:5.3.29] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) [spring-security-web-5.7.10.jar:5.7.10] at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:112) [spring-security-web-5.7.10.jar:5.7.10] at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:82) [spring-security-web-5.7.10.jar:5.7.10] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) [spring-security-web-5.7.10.jar:5.7.10] at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55) [spring-security-web-5.7.10.jar:5.7.10] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.29.jar:5.3.29] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) [spring-security-web-5.7.10.jar:5.7.10] at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42) [spring-security-web-5.7.10.jar:5.7.10] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.29.jar:5.3.29] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) [spring-security-web-5.7.10.jar:5.7.10] at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:221) [spring-security-web-5.7.10.jar:5.7.10] at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:186) [spring-security-web-5.7.10.jar:5.7.10] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354) [spring-web-5.3.29.jar:5.3.29] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267) [spring-web-5.3.29.jar:5.3.29] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) [spring-web-5.3.29.jar:5.3.29] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.29.jar:5.3.29] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) [spring-web-5.3.29.jar:5.3.29] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.29.jar:5.3.29] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) [spring-web-5.3.29.jar:5.3.29] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.29.jar:5.3.29] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1790) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) [tomcat-embed-core-9.0.79.jar:9.0.79] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.79.jar:9.0.79] at java.lang.Thread.run(Thread.java:750) [na:1.8.0_371]
- 미해결Spring Boot JWT Tutorial
new User 생성자 오류 발생하는 분들...
아래 코드와 같이 에러 발생하는 분들...바보 같았네요.User principal = new User(claims.getSubject(), "", authorities);import me.{..}.jwttutorial.entity.User;이 아니고import org.springframework.security.core.userdetails.User;입니다
- 미해결Spring Boot JWT Tutorial
requestMatchers 관련 에러 뜨시는 분들 참고하세요
@Bean public WebSecurityCustomizer configure(){ return (web) -> web.ignoring() .requestMatchers(new AntPathRequestMatcher("/h2-console/**")) .requestMatchers(new AntPathRequestMatcher("/favicon.ico")); } @Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception{ http .authorizeRequests() .requestMatchers(new AntPathRequestMatcher("/api/hello")).permitAll() .anyRequest().authenticated(); return http.build(); }
- 미해결Spring Boot JWT Tutorial
토큰반환이 안되는거같아요
회원가입 까지는 db에 값이 잘 들어갔는데 그 정보로 포스트맨을 통해 로그인하려고 하면 아무런 에러없이 토큰도 반환해주지 않는데 어떻게 해결하나요 ㅜ "C:\Program Files\Java\jdk-17\bin\java.exe" -XX:TieredStopAtLevel=1 -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-Dmanagement.endpoints.jmx.exposure.include=*" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2022.3.3\lib\idea_rt.jar=60002:C:\Program Files\JetBrains\IntelliJ IDEA 2022.3.3\bin" -Dfile.encoding=UTF-8 -classpath C:\Users\qkral\Desktop\GoJiSik_BE\out\production\classes;C:\Users\qkral\Desktop\GoJiSik_BE\out\production\resources;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.projectlombok\lombok\1.18.28\a2ff5da8bcd8b1b26f36b806ced63213362c6dcc\lombok-1.18.28.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-data-jpa\3.1.2\a37d54373b11d2de70dfb8bcd6612dc63787f4a8\spring-boot-starter-data-jpa-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-security\3.1.2\f51204b86f626c2a7f0d41f88e8e3bd86091dd1d\spring-boot-starter-security-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-validation\3.1.2\1e2f4bdd1913af954d3a929e692807cb3a19b0b4\spring-boot-starter-validation-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-web\3.1.2\30b824817e764a5a5a1e9fb46e7ace40bcfa3185\spring-boot-starter-web-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\com.h2database\h2\2.1.214\d5c2005c9e3279201e12d4776c948578b16bf8b2\h2-2.1.214.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\io.jsonwebtoken\jjwt-api\0.11.5\f742940045619d06383e7df37b21ac422b476cf1\jjwt-api-0.11.5.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-aop\3.1.2\e882bf8c8853807a8e69cce9465ec12233fb5437\spring-boot-starter-aop-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-jdbc\3.1.2\e864f6a34d620e7e698c115881ea23b08f7125e9\spring-boot-starter-jdbc-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.hibernate.orm\hibernate-core\6.2.6.Final\9c4586a4a2dc721439ee454d5c858c1235b6ecba\hibernate-core-6.2.6.Final.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.data\spring-data-jpa\3.1.2\e9507688bc27006a5fb9ae4d13c1a5685354eb4a\spring-data-jpa-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-aspects\6.0.11\7b6fcc5d4f06c36c332b7a122dca863163a127d4\spring-aspects-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter\3.1.2\c09a48df6fbc2b07b7aef1256b45260a3478b49f\spring-boot-starter-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.security\spring-security-config\6.1.2\f6391123f7c3cb7a158266fc81cc4c82c5c4fe19\spring-security-config-6.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.security\spring-security-web\6.1.2\c1f133de05e895e58b34461f6b1189a8d6a0d56a\spring-security-web-6.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-aop\6.0.11\15b85c825558fadb85e3c77779d7225ce7e4a7bc\spring-aop-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-el\10.1.11\97aa65b1f036f722e869f582f8d607d01508d420\tomcat-embed-el-10.1.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.hibernate.validator\hibernate-validator\8.0.1.Final\e49e116b3d3928060599b176b3538bb848718e95\hibernate-validator-8.0.1.Final.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-json\3.1.2\c48d521879dbbcebe1a99f47257612968e022f5b\spring-boot-starter-json-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-webmvc\6.0.11\892b4a63b5d930c2c43058c6db0c2c65401fb078\spring-webmvc-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-tomcat\3.1.2\2e7284f8ecf2989e1a6ffc7faf964eccb309bfd4\spring-boot-starter-tomcat-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-web\6.0.11\c32a7bf6b88b83bac6aa63866fcf208892640446\spring-web-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.aspectj\aspectjweaver\1.9.19\afbffb1210239fbba5cad73093c5b216d515838f\aspectjweaver-1.9.19.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\com.zaxxer\HikariCP\5.0.1\a74c7f0a37046846e88d54f7cb6ea6d565c65f9c\HikariCP-5.0.1.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-jdbc\6.0.11\dc495b5cb8052f044fd29aa68bb2231b1895b8f4\spring-jdbc-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\jakarta.persistence\jakarta.persistence-api\3.1.0\66901fa1c373c6aff65c13791cc11da72060a8d6\jakarta.persistence-api-3.1.0.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\jakarta.transaction\jakarta.transaction-api\2.0.1\51a520e3fae406abb84e2e1148e6746ce3f80a1a\jakarta.transaction-api-2.0.1.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-context\6.0.11\a7b10f3d3c1492bfc4e6d7c966cd2e21f4d441f5\spring-context-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-orm\6.0.11\dde0c5f956052c8c3865e95202dd35b7437b2c6f\spring-orm-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.data\spring-data-commons\3.1.2\cf75c8a2a11d24df5bdb4d796d4b449bab3bed07\spring-data-commons-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-tx\6.0.11\59cd03d2ba6968ade8c192b4d6488efb48ec36f\spring-tx-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-beans\6.0.11\8513efc6e94b407b5cd85f69eeec511f1ef34164\spring-beans-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-core\6.0.11\87834b5cf95c6fa28f5bdf8a85e0daf0bff918a8\spring-core-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.antlr\antlr4-runtime\4.10.1\10839f875928f59c622d675091d51a43ea0dc5f7\antlr4-runtime-4.10.1.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\jakarta.annotation\jakarta.annotation-api\2.1.1\48b9bda22b091b1f48b13af03fe36db3be6e1ae3\jakarta.annotation-api-2.1.1.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.slf4j\slf4j-api\2.0.7\41eb7184ea9d556f23e18b5cb99cad1f8581fc00\slf4j-api-2.0.7.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-autoconfigure\3.1.2\ea294976f925441fc1d5a5414d5d31717f06aa3c\spring-boot-autoconfigure-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot\3.1.2\3cf070561716277ec91ebadc07362dd0b4a9f63f\spring-boot-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-logging\3.1.2\4e47bd132fdd0d60ad57d70bdc99198b182166ee\spring-boot-starter-logging-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.yaml\snakeyaml\1.33\2cd0a87ff7df953f810c344bdf2fe3340b954c69\snakeyaml-1.33.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.security\spring-security-core\6.1.2\acd42f051b0f38d043ad807ca542f1f53bfa2fe\spring-security-core-6.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-expression\6.0.11\1d0940120a275719c3988c592068f4acf807fe59\spring-expression-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\jakarta.validation\jakarta.validation-api\3.0.2\92b6631659ba35ca09e44874d3eb936edfeee532\jakarta.validation-api-3.0.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.jboss.logging\jboss-logging\3.5.3.Final\c88fc1d8a96d4c3491f55d4317458ccad53ca663\jboss-logging-3.5.3.Final.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\com.fasterxml\classmate\1.5.1\3fe0bed568c62df5e89f4f174c101eab25345b6c\classmate-1.5.1.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.datatype\jackson-datatype-jsr310\2.15.2\30d16ec2aef6d8094c5e2dce1d95034ca8b6cb42\jackson-datatype-jsr310-2.15.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.module\jackson-module-parameter-names\2.15.2\75f8d2788db20f6c587c7a19e94fb6248c314241\jackson-module-parameter-names-2.15.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.datatype\jackson-datatype-jdk8\2.15.2\66a50e089cfd2f93896b9b6f7a734cea7bcf2f31\jackson-datatype-jdk8-2.15.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind\2.15.2\9353b021f10c307c00328f52090de2bdb4b6ff9c\jackson-databind-2.15.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-websocket\10.1.11\ac9ecc8a2b6a2cd8123554259faabc2e7b4aa013\tomcat-embed-websocket-10.1.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-core\10.1.11\9d1ba230cbe0dfb410b0beba102eff20e14793a1\tomcat-embed-core-10.1.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\io.micrometer\micrometer-observation\1.11.2\704e145c4801320b4c7abf6c1a5b000155b069db\micrometer-observation-1.11.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-jcl\6.0.11\c9b16cdb6d4874ba4118fcdd4b0335f6278b378\spring-jcl-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-classic\1.4.8\f00ba91d993e4d14301b11968d3cacc3be7ef3e1\logback-classic-1.4.8.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-to-slf4j\2.20.0\d37f81f8978e2672bc32c82712ab4b3f66624adc\log4j-to-slf4j-2.20.0.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.slf4j\jul-to-slf4j\2.0.7\a48f44aeaa8a5ddc347007298a28173ac1fbbd8b\jul-to-slf4j-2.0.7.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.security\spring-security-crypto\6.1.2\3acab1c7979cc9d44d5e12e7f5acd4d9552e6b83\spring-security-crypto-6.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.15.2\4724a65ac8e8d156a24898d50fd5dbd3642870b8\jackson-annotations-2.15.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core\2.15.2\a6fe1836469a69b3ff66037c324d75fc66ef137c\jackson-core-2.15.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\io.micrometer\micrometer-commons\1.11.2\f03f87bd7eacf79b00aa89907c6e30e0ec86b4\micrometer-commons-1.11.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-core\1.4.8\3fba9c105e0efc5ffdcda701379687917d5286f7\logback-core-1.4.8.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-api\2.20.0\1fe6082e660daf07c689a89c94dc0f49c26b44bb\log4j-api-2.20.0.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\io.jsonwebtoken\jjwt-impl\0.11.5\40a599f0e8a8e4e0701596fbb15e67bfda64fdf0\jjwt-impl-0.11.5.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\io.jsonwebtoken\jjwt-jackson\0.11.5\3b83a06809e98a69402d7333dcf67df6f6ea4579\jjwt-jackson-0.11.5.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.hibernate.common\hibernate-commons-annotations\6.0.6.Final\77a5f94b56d49508e0ee334751db5b78e5ccd50c\hibernate-commons-annotations-6.0.6.Final.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\io.smallrye\jandex\3.0.5\c548a4871b552292dbdd65409d3fda145c8925c1\jandex-3.0.5.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\net.bytebuddy\byte-buddy\1.14.5\28a424c0c4f362568e904d992c239c996cf7adc7\byte-buddy-1.14.5.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\jaxb-runtime\4.0.3\93af25be25b2c92c83e0ce61cb8b3ed23568f316\jaxb-runtime-4.0.3.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\jakarta.xml.bind\jakarta.xml.bind-api\4.0.0\bbb399208d288b15ec101fa4fcfc4bd77cedc97a\jakarta.xml.bind-api-4.0.0.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\jakarta.inject\jakarta.inject-api\2.0.1\4c28afe1991a941d7702fe1362c365f0a8641d1e\jakarta.inject-api-2.0.1.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\jaxb-core\4.0.3\e9093b4a82069a1d78ee9a3233ca387bca88861f\jaxb-core-4.0.3.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\jakarta.activation\jakarta.activation-api\2.1.2\640c0d5aff45dbff1e1a1bc09673ff3a02b1ba12\jakarta.activation-api-2.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.eclipse.angus\angus-activation\2.0.1\eaafaf4eb71b400e4136fc3a286f50e34a68ecb7\angus-activation-2.0.1.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\txw2\4.0.3\47b8fe31c6d1a3382203af919400527389e01e9c\txw2-4.0.3.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\com.sun.istack\istack-commons-runtime\4.1.2\18ec117c85f3ba0ac65409136afa8e42bc74e739\istack-commons-runtime-4.1.2.jar com.likelion.nsu.gojisik.GojisikApplication . ____ _ /\\ / ___'_ __ (_)_ _ \ \ \ \( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v3.1.2)2023-08-14T05:24:36.414+09:00 INFO 18164 --- [ main] c.l.nsu.gojisik.GojisikApplication : Starting GojisikApplication using Java 17.0.6 with PID 18164 (C:\Users\qkral\Desktop\GoJiSik_BE\out\production\classes started by qkral in C:\Users\qkral\Desktop\GoJiSik_BE)2023-08-14T05:24:36.417+09:00 INFO 18164 --- [ main] c.l.nsu.gojisik.GojisikApplication : No active profile set, falling back to 1 default profile: "default"2023-08-14T05:24:37.478+09:00 INFO 18164 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.2023-08-14T05:24:37.579+09:00 INFO 18164 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 89 ms. Found 2 JPA repository interfaces.2023-08-14T05:24:38.352+09:00 INFO 18164 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8081 (http)2023-08-14T05:24:38.367+09:00 INFO 18164 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]2023-08-14T05:24:38.367+09:00 INFO 18164 --- [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.11]2023-08-14T05:24:38.521+09:00 INFO 18164 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext2023-08-14T05:24:38.522+09:00 INFO 18164 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2049 ms2023-08-14T05:24:38.574+09:00 INFO 18164 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...2023-08-14T05:24:38.669+09:00 INFO 18164 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection conn0: url=jdbc:h2:tcp://localhost/~/GoJiSik_BE1 user=SA2023-08-14T05:24:38.671+09:00 INFO 18164 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.2023-08-14T05:24:38.682+09:00 INFO 18164 --- [ main] o.s.b.a.h2.H2ConsoleAutoConfiguration : H2 console available at '/h2-console'. Database available at 'jdbc:h2:tcp://localhost/~/GoJiSik_BE1'2023-08-14T05:24:38.881+09:00 INFO 18164 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]2023-08-14T05:24:38.958+09:00 INFO 18164 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.2.6.Final2023-08-14T05:24:38.961+09:00 INFO 18164 --- [ main] org.hibernate.cfg.Environment : HHH000406: Using bytecode reflection optimizer2023-08-14T05:24:39.169+09:00 INFO 18164 --- [ main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy2023-08-14T05:24:39.352+09:00 INFO 18164 --- [ main] o.s.o.j.p.SpringPersistenceUnitInfo : No LoadTimeWeaver setup: ignoring JPA class transformer2023-08-14T05:24:39.773+09:00 INFO 18164 --- [ main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy2023-08-14T05:24:40.918+09:00 INFO 18164 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]2023-08-14T05:24:40.950+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : drop table if exists answer cascade Hibernate: drop table if exists answer cascade 2023-08-14T05:24:40.953+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : drop table if exists authority cascade Hibernate: drop table if exists authority cascade 2023-08-14T05:24:40.954+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : drop table if exists file cascade Hibernate: drop table if exists file cascade 2023-08-14T05:24:40.955+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : drop table if exists member cascade Hibernate: drop table if exists member cascade 2023-08-14T05:24:40.955+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : drop table if exists question cascade Hibernate: drop table if exists question cascade 2023-08-14T05:24:40.956+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : drop table if exists user_authority cascade Hibernate: drop table if exists user_authority cascade 2023-08-14T05:24:40.957+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : drop sequence if exists answer_seqHibernate: drop sequence if exists answer_seq2023-08-14T05:24:40.957+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : drop sequence if exists file_seqHibernate: drop sequence if exists file_seq2023-08-14T05:24:40.957+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : drop sequence if exists question_seqHibernate: drop sequence if exists question_seq2023-08-14T05:24:40.963+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : create sequence answer_seq start with 1 increment by 50Hibernate: create sequence answer_seq start with 1 increment by 502023-08-14T05:24:40.964+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : create sequence file_seq start with 1 increment by 50Hibernate: create sequence file_seq start with 1 increment by 502023-08-14T05:24:40.964+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : create sequence question_seq start with 1 increment by 50Hibernate: create sequence question_seq start with 1 increment by 502023-08-14T05:24:40.968+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : create table answer ( is_adopted boolean, created_date timestamp(6), id bigint not null, member_id bigint, question_id bigint, contents varchar(255), primary key (id) )Hibernate: create table answer ( is_adopted boolean, created_date timestamp(6), id bigint not null, member_id bigint, question_id bigint, contents varchar(255), primary key (id) )2023-08-14T05:24:40.969+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : create table authority ( authority_name varchar(50) not null, primary key (authority_name) )Hibernate: create table authority ( authority_name varchar(50) not null, primary key (authority_name) )2023-08-14T05:24:40.971+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : create table file ( file_size bigint, id bigint not null, origin_file_name varchar(255), saved_file_name varchar(255), type varchar(255) check (type in ('Image','Audio')), primary key (id) )Hibernate: create table file ( file_size bigint, id bigint not null, origin_file_name varchar(255), saved_file_name varchar(255), type varchar(255) check (type in ('Image','Audio')), primary key (id) )2023-08-14T05:24:40.973+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : create table member ( activated boolean not null, font integer not null, grade tinyint check (grade between 0 and 2), birthday timestamp(6), member_id bigint generated by default as identity, point bigint, password varchar(255), phone_number varchar(255), username varchar(255), primary key (member_id) )Hibernate: create table member ( activated boolean not null, font integer not null, grade tinyint check (grade between 0 and 2), birthday timestamp(6), member_id bigint generated by default as identity, point bigint, password varchar(255), phone_number varchar(255), username varchar(255), primary key (member_id) )2023-08-14T05:24:40.975+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : create table question ( created_date timestamp(6), file_id bigint unique, hits bigint, id bigint not null, user_id bigint, category varchar(255), contents varchar(255), title varchar(255), primary key (id) )Hibernate: create table question ( created_date timestamp(6), file_id bigint unique, hits bigint, id bigint not null, user_id bigint, category varchar(255), contents varchar(255), title varchar(255), primary key (id) )2023-08-14T05:24:40.978+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : create table user_authority ( member_id bigint not null, authority_name varchar(50) not null, primary key (member_id, authority_name) )Hibernate: create table user_authority ( member_id bigint not null, authority_name varchar(50) not null, primary key (member_id, authority_name) )2023-08-14T05:24:40.981+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : alter table if exists answer add constraint FKn2sp5pa6h0u2kixjl2r4vfluf foreign key (member_id) references memberHibernate: alter table if exists answer add constraint FKn2sp5pa6h0u2kixjl2r4vfluf foreign key (member_id) references member2023-08-14T05:24:40.982+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : alter table if exists answer add constraint FK8frr4bcabmmeyyu60qt7iiblo foreign key (question_id) references questionHibernate: alter table if exists answer add constraint FK8frr4bcabmmeyyu60qt7iiblo foreign key (question_id) references question2023-08-14T05:24:40.983+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : alter table if exists question add constraint FK6fsg3647bhqmogxrp2bqksnf3 foreign key (file_id) references fileHibernate: alter table if exists question add constraint FK6fsg3647bhqmogxrp2bqksnf3 foreign key (file_id) references file2023-08-14T05:24:40.985+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : alter table if exists question add constraint FK1f5tvh6o6n30k5h6iqefshhu5 foreign key (user_id) references memberHibernate: alter table if exists question add constraint FK1f5tvh6o6n30k5h6iqefshhu5 foreign key (user_id) references member2023-08-14T05:24:40.986+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : alter table if exists user_authority add constraint FK6ktglpl5mjosa283rvken2py5 foreign key (authority_name) references authorityHibernate: alter table if exists user_authority add constraint FK6ktglpl5mjosa283rvken2py5 foreign key (authority_name) references authority2023-08-14T05:24:40.989+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL : alter table if exists user_authority add constraint FKb27h85xa52amfh4qk85mlxudl foreign key (member_id) references memberHibernate: alter table if exists user_authority add constraint FKb27h85xa52amfh4qk85mlxudl foreign key (member_id) references member2023-08-14T05:24:40.996+09:00 INFO 18164 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'2023-08-14T05:24:41.596+09:00 WARN 18164 --- [ main] ocalVariableTableParameterNameDiscoverer : Using deprecated '-debug' fallback for parameter name resolution. Compile the affected code with '-parameters' instead or avoid its introspection: com.likelion.nsu.gojisik.repository.UserRepository2023-08-14T05:24:41.845+09:00 WARN 18164 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning2023-08-14T05:24:42.025+09:00 INFO 18164 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@3fc7abf6, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@1016b44e, org.springframework.security.web.context.SecurityContextHolderFilter@565030b7, org.springframework.security.web.header.HeaderWriterFilter@43c3354, org.springframework.security.web.authentication.logout.LogoutFilter@6bbac73d, org.springframework.web.filter.CorsFilter@5e593b08, com.likelion.nsu.gojisik.security.JwtFilter@6c6c93f8, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@2eb31735, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@73753326, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@38e88e13, org.springframework.security.web.session.SessionManagementFilter@750adad8, org.springframework.security.web.access.ExceptionTranslationFilter@2fafa9bf, org.springframework.security.web.access.intercept.AuthorizationFilter@7ec75228]2023-08-14T05:24:42.643+09:00 INFO 18164 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8081 (http) with context path ''2023-08-14T05:24:42.652+09:00 INFO 18164 --- [ main] c.l.nsu.gojisik.GojisikApplication : Started GojisikApplication in 6.984 seconds (process running for 7.725)2023-08-14T05:24:56.675+09:00 INFO 18164 --- [nio-8081-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'2023-08-14T05:24:56.675+09:00 INFO 18164 --- [nio-8081-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'2023-08-14T05:24:56.677+09:00 INFO 18164 --- [nio-8081-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 2 ms2023-08-14T05:24:57.142+09:00 DEBUG 18164 --- [nio-8081-exec-1] org.hibernate.SQL : select m1_0.member_id, m1_0.activated, a1_0.member_id, a1_1.authority_name, m1_0.birthday, m1_0.font, m1_0.grade, m1_0.password, m1_0.phone_number, m1_0.point, m1_0.username from member m1_0 left join (user_authority a1_0 join authority a1_1 on a1_1.authority_name=a1_0.authority_name) on m1_0.member_id=a1_0.member_id where m1_0.username=?Hibernate: select m1_0.member_id, m1_0.activated, a1_0.member_id, a1_1.authority_name, m1_0.birthday, m1_0.font, m1_0.grade, m1_0.password, m1_0.phone_number, m1_0.point, m1_0.username from member m1_0 left join (user_authority a1_0 join authority a1_1 on a1_1.authority_name=a1_0.authority_name) on m1_0.member_id=a1_0.member_id where m1_0.username=?2023-08-14T05:24:57.143+09:00 TRACE 18164 --- [nio-8081-exec-1] org.hibernate.orm.jdbc.bind : binding parameter [1] as [VARCHAR] - [01084912125]2023-08-14T05:25:00.654+09:00 DEBUG 18164 --- [nio-8081-exec-3] org.hibernate.SQL : select m1_0.member_id, m1_0.activated, a1_0.member_id, a1_1.authority_name, m1_0.birthday, m1_0.font, m1_0.grade, m1_0.password, m1_0.phone_number, m1_0.point, m1_0.username from member m1_0 left join (user_authority a1_0 join authority a1_1 on a1_1.authority_name=a1_0.authority_name) on m1_0.member_id=a1_0.member_id where m1_0.username=?Hibernate: select m1_0.member_id, m1_0.activated, a1_0.member_id, a1_1.authority_name, m1_0.birthday, m1_0.font, m1_0.grade, m1_0.password, m1_0.phone_number, m1_0.point, m1_0.username from member m1_0 left join (user_authority a1_0 join authority a1_1 on a1_1.authority_name=a1_0.authority_name) on m1_0.member_id=a1_0.member_id where m1_0.username=?2023-08-14T05:25:00.655+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [1] as [VARCHAR] - [01084912125]2023-08-14T05:25:00.775+09:00 DEBUG 18164 --- [nio-8081-exec-3] org.hibernate.SQL : insert into member (activated,birthday,font,grade,password,phone_number,point,username,member_id) values (?,?,?,?,?,?,?,?,default)Hibernate: insert into member (activated,birthday,font,grade,password,phone_number,point,username,member_id) values (?,?,?,?,?,?,?,?,default)2023-08-14T05:25:00.790+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [1] as [BOOLEAN] - [true]2023-08-14T05:25:00.790+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [2] as [TIMESTAMP] - [null]2023-08-14T05:25:00.790+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [3] as [INTEGER] - [0]2023-08-14T05:25:00.790+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [4] as [TINYINT] - [null]2023-08-14T05:25:00.790+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [5] as [VARCHAR] - [$2a$10$lXqx/USXvQtMk5U7tGg7.OIcNUGHOSRTGzpigXehAMAahzcYpcHJO]2023-08-14T05:25:00.791+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [6] as [VARCHAR] - [01084912125]2023-08-14T05:25:00.791+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [7] as [BIGINT] - [null]2023-08-14T05:25:00.791+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [8] as [VARCHAR] - [null]2023-08-14T05:25:00.824+09:00 DEBUG 18164 --- [nio-8081-exec-3] org.hibernate.SQL : insert into authority (authority_name) values (?)Hibernate: insert into authority (authority_name) values (?)2023-08-14T05:25:00.825+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [1] as [VARCHAR] - [ROLE_USER]2023-08-14T05:25:00.830+09:00 DEBUG 18164 --- [nio-8081-exec-3] org.hibernate.SQL : insert into user_authority (member_id,authority_name) values (?,?)Hibernate: insert into user_authority (member_id,authority_name) values (?,?)2023-08-14T05:25:00.831+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [1] as [BIGINT] - [1]2023-08-14T05:25:00.831+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [2] as [VARCHAR] - [ROLE_USER]2023-08-14T05:25:04.414+09:00 DEBUG 18164 --- [nio-8081-exec-4] org.hibernate.SQL : select m1_0.member_id, m1_0.activated, a1_0.member_id, a1_1.authority_name, m1_0.birthday, m1_0.font, m1_0.grade, m1_0.password, m1_0.phone_number, m1_0.point, m1_0.username from member m1_0 left join (user_authority a1_0 join authority a1_1 on a1_1.authority_name=a1_0.authority_name) on m1_0.member_id=a1_0.member_id where m1_0.username=?Hibernate: select m1_0.member_id, m1_0.activated, a1_0.member_id, a1_1.authority_name, m1_0.birthday, m1_0.font, m1_0.grade, m1_0.password, m1_0.phone_number, m1_0.point, m1_0.username from member m1_0 left join (user_authority a1_0 join authority a1_1 on a1_1.authority_name=a1_0.authority_name) on m1_0.member_id=a1_0.member_id where m1_0.username=?2023-08-14T05:25:04.414+09:00 TRACE 18164 --- [nio-8081-exec-4] org.hibernate.orm.jdbc.bind : binding parameter [1] as [VARCHAR] - [01084912125]2023-08-14T05:38:49.268+09:00 DEBUG 18164 --- [io-8081-exec-10] org.hibernate.SQL : select m1_0.member_id, m1_0.activated, a1_0.member_id, a1_1.authority_name, m1_0.birthday, m1_0.font, m1_0.grade, m1_0.password, m1_0.phone_number, m1_0.point, m1_0.username from member m1_0 left join (user_authority a1_0 join authority a1_1 on a1_1.authority_name=a1_0.authority_name) on m1_0.member_id=a1_0.member_id where m1_0.username=?Hibernate: select m1_0.member_id, m1_0.activated, a1_0.member_id, a1_1.authority_name, m1_0.birthday, m1_0.font, m1_0.grade, m1_0.password, m1_0.phone_number, m1_0.point, m1_0.username from member m1_0 left join (user_authority a1_0 join authority a1_1 on a1_1.authority_name=a1_0.authority_name) on m1_0.member_id=a1_0.member_id where m1_0.username=?2023-08-14T05:38:49.269+09:00 TRACE 18164 --- [io-8081-exec-10] org.hibernate.orm.jdbc.bind : binding parameter [1] as [VARCHAR] - [01084912125]
- 미해결Spring Boot JWT Tutorial
mysql 사용시 SQLSyntaxErrorException에러발생
엔티티 생성후 실행을 해보니 Caused by: java.sql.SQLSyntaxErrorException: Table 'onehour.user_authority' doesn't exist에러가 납니다이유가 궁금합니다 유저랑 authority는 생성이 잘 된 것 같은데...그리고 mysql사용시 따로 커넥션을 허용해주는 설정을 추가 안해줘도 될까요?