Skip to content

Commit

Permalink
Merge pull request #84 from KUSITMS-30th-TEAM-A/feature/#78/result-re…
Browse files Browse the repository at this point in the history
…factor

[refactor] : Result와 Stadium의 DDD구조 변경 및 Result 어그리게이트에 관한 간접참조와, 객체탐색 리팩토링을 진행한다.
  • Loading branch information
juuuunny authored Nov 25, 2024
2 parents 8edac89 + 6ad12de commit 6e282c7
Show file tree
Hide file tree
Showing 101 changed files with 3,121 additions and 965 deletions.
27 changes: 26 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,33 @@ dependencies {

}

def querydslDir = "src/main/generated"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17) // Java 버전
}
}

tasks.named('compileJava', JavaCompile).configure {
options.annotationProcessorGeneratedSourcesDirectory = file("$build/generated/sources/annotationProcessor/java/main")
}

sourceSets {
main {
java {
srcDirs += "$build/generated/sources/annotationProcessor/java/main"
}
}
}

tasks.named('compileJava') {
doFirst {
// QClass 파일 자동 삭제
def querydslGeneratedDir = layout.buildDirectory.dir("generated/sources/annotationProcessor/java/main").get().asFile
if (querydslGeneratedDir.exists()) {
querydslGeneratedDir.deleteDir()
}
}
}
ext {
snippetsDir = file('build/generated-snippets')
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import kusitms.backend.auth.jwt.JWTUtil;
import kusitms.backend.user.application.UserService;
import kusitms.backend.user.application.UserApplicationService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.Authentication;
Expand All @@ -19,7 +19,7 @@
public class OAuth2LoginSuccessHandler extends SimpleUrlAuthenticationSuccessHandler {

private final JWTUtil jwtUtil;
private final UserService userService;
private final UserApplicationService userApplicationService;

/**
* OAuth2 로그인 성공 후 처리.
Expand All @@ -34,13 +34,13 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo
OAuth2AuthenticationToken token = (OAuth2AuthenticationToken) authentication;

// 신규 사용자 처리
if (userService.isNewUser(token)) {
userService.handleNewUser(token, response);
if (userApplicationService.isNewUser(token)) {
userApplicationService.handleNewUser(token, response);
getRedirectStrategy().sendRedirect(request, response, jwtUtil.getRedirectOnboardingUrl());
}
// 기존 사용자 처리
else {
userService.handleExistingUser(token, response);
userApplicationService.handleExistingUser(token, response);
getRedirectStrategy().sendRedirect(request, response, jwtUtil.getRedirectBaseUrl());
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/kusitms/backend/auth/jwt/JWTFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected boolean shouldNotFilter(HttpServletRequest request) {
|| path.equals("/api/v1/token/re-issue")
|| path.equals("/api/v1/test/docs") || path.startsWith(("/swagger-ui")) || path.startsWith("/v3/api-docs")
|| path.startsWith("/api/v1/results") || path.startsWith("/api/v1/stadium")
|| path.startsWith("/api/v1/culture")
|| path.equals("/api/v1/foods") || path.equals("/api/v1/entertainments")
|| path.startsWith("/api/v1/chatbot")
;
}
Expand Down

This file was deleted.

45 changes: 0 additions & 45 deletions src/main/java/kusitms/backend/culture/application/FoodService.java

This file was deleted.

This file was deleted.

54 changes: 0 additions & 54 deletions src/main/java/kusitms/backend/culture/domain/entity/Food.java

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
"/api/v1/send-code","/api/v1/verify-code",
"/api/v1/token/re-issue",
"/api/v1/results/**", "/api/v1/stadium/**",
"/api/v1/culture/**",
"/api/v1/foods", "/api/v1/entertainments",
"/api/v1/chatbot/**").permitAll() // 인증이 필요 없는 경로 설정
.anyRequest().authenticated())
.sessionManagement(session -> session
Expand Down
Loading

0 comments on commit 6e282c7

Please sign in to comment.