Skip to content

Commit

Permalink
Bug: database 자동 종료 문제 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
nampongo committed Mar 16, 2024
1 parent 64fa2e0 commit 6443c7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
@RequiredArgsConstructor
public class OAuth2MemberSuccessHandler extends SimpleUrlAuthenticationSuccessHandler {

@Value("${custom.oauth2.authorized-redirect-url}")
private String REDIRECT_URI;
@Value("${custom.site.frontUrl}")
private String FRONT_URL;
private final MemberRepository memberRepository;
private final TokenProvider tokenProvider;
private final RedisUtil redisUtil;
Expand All @@ -47,12 +47,11 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo
redisUtil.save(userEmail, token.getRefreshToken());*/

String url = makeRedirectUrl(token.getAccessToken(), token.getRefreshToken(), token.getHasInfo());
log.info("send redirect to {}", url);
response.sendRedirect(url);
}

private String makeRedirectUrl(String access, String refresh, Boolean hasInfo) {
return UriComponentsBuilder.fromUriString(REDIRECT_URI)
return UriComponentsBuilder.fromUriString(FRONT_URL + "/oauth")
.queryParam("accessToken", access)
.queryParam("refreshToken", refresh)
.queryParam("hasInfo", hasInfo)
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
server:
port: 9000

spring:
data:
redis:
Expand All @@ -26,6 +25,8 @@ spring:
idle-timeout: '${custom.hikari.idle-timeout}'
max-lifetime: '${custom.hikari.max-lifetime}'
minimum-idle: '${custom.hikari.minimum-idle}'
dbcp2:
validation-query: SELECT 1
jpa:
hibernate:
ddl-auto: update
Expand All @@ -36,7 +37,7 @@ spring:
show_sql: true
use_sql_comments: true
default_batch_fetch_size: 1000
defer-datasource-initialization: true
defer-datasource-initialization: false
sql:
init:
mode: always
Expand Down

0 comments on commit 6443c7e

Please sign in to comment.