Skip to content

Commit

Permalink
[#1]✅Test: CI/CD Test7
Browse files Browse the repository at this point in the history
  • Loading branch information
sumin220 committed Nov 20, 2024
1 parent 494b8f2 commit 6323810
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 41 deletions.
19 changes: 9 additions & 10 deletions src/main/java/univ/yesummit/global/auth/config/WebMvcConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,18 @@ public class WebMvcConfig implements WebMvcConfigurer {

private final AuthArgumentResolver authArgumentResolver;

//
// @Override
// public void addCorsMappings(final CorsRegistry registry ){
// registry.addMapping("/**")
// .allowedOriginPatterns("*")
// .allowedMethods("PATCH","GET","POST","PUT","DELETE","HEAD","OPTIONS")
// .allowedHeaders("*")
// .allowCredentials(true);
// }
@Override
public void addCorsMappings(final CorsRegistry registry ){
registry.addMapping("/**")
.allowedOriginPatterns("*")
.allowedMethods("PATCH","GET","POST","PUT","DELETE","HEAD","OPTIONS")
.allowedHeaders("*")
.allowCredentials(true);
}

@Override
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
WebMvcConfigurer.super.addArgumentResolvers(resolvers); // 기존 Resolver
resolvers.add(authArgumentResolver); // 커스텀 Resolver
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ public class AuthController {
public RedirectView login() {
return new RedirectView("/oauth2/authorization/kakao");
}
//check1
}
}
8 changes: 1 addition & 7 deletions src/main/java/univ/yesummit/global/auth/util/JwtUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.auth0.jwt.interfaces.DecodedJWT;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;
import jakarta.annotation.PostConstruct;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.transaction.Transactional;
Expand Down Expand Up @@ -49,11 +48,6 @@ public class JwtUtils {

private final MemberRepository memberRepository;

@PostConstruct
public void init() {
log.info("JwtUtils initialized with secret: {}", secret);
}

public String createAccessToken(Long memberId) {

log.info("memberId info: {}", memberId.toString());
Expand Down Expand Up @@ -166,4 +160,4 @@ public boolean isValid(String token) {
}
}
//==========================================================================//
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ public static String getLoginUsername() {

throw new IllegalStateException("Unknown principal type");
}
}
}
21 changes: 0 additions & 21 deletions src/main/java/univ/yesummit/global/swagger/SwaggerConfig.java

This file was deleted.

0 comments on commit 6323810

Please sign in to comment.