-
Notifications
You must be signed in to change notification settings - Fork 0
config: application.yml 설정 #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
af675f8
config: application-local.yml 수정
gnsdp99 c89e1af
config: application-dev.yml 생성
gnsdp99 48ca1a2
config: application-test.yml 수정
gnsdp99 b16957b
config: application.yml 수정
gnsdp99 5d7564f
config: .gitignore 수정
gnsdp99 f36e1f9
config: build-test.yml 수정
gnsdp99 7af6f77
config: application.yml 수정
gnsdp99 7a3b1f1
config: FrontendProperties 클래스 생성
gnsdp99 5dd9667
config: FrontendProperties 클래스 적용
gnsdp99 f74d82d
config: build-test.yml 수정
gnsdp99 6aa8556
config: 프론트엔드 local url 추가
gnsdp99 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,4 +37,4 @@ out/ | |
| .vscode/ | ||
|
|
||
| ### Properties ### | ||
| application-secret.yml | ||
| application-secret** | ||
9 changes: 5 additions & 4 deletions
9
src/main/java/com/jobnote/auth/handler/OAuth2LoginFailureHandler.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,24 @@ | ||
| package com.jobnote.auth.handler; | ||
|
|
||
| import com.jobnote.global.config.properties.FrontendProperties; | ||
| import jakarta.servlet.ServletException; | ||
| import jakarta.servlet.http.HttpServletRequest; | ||
| import jakarta.servlet.http.HttpServletResponse; | ||
| import org.springframework.beans.factory.annotation.Value; | ||
| import lombok.RequiredArgsConstructor; | ||
| import org.springframework.security.core.AuthenticationException; | ||
| import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler; | ||
| import org.springframework.stereotype.Component; | ||
|
|
||
| import java.io.IOException; | ||
|
|
||
| @RequiredArgsConstructor | ||
| @Component | ||
| public class OAuth2LoginFailureHandler extends SimpleUrlAuthenticationFailureHandler { | ||
|
|
||
| @Value("${app.frontend.base-url}") | ||
| private String frontendBaseUrl; | ||
| private final FrontendProperties frontendProperties; | ||
|
|
||
| @Override | ||
| public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException { | ||
| response.sendRedirect(frontendBaseUrl); | ||
| response.sendRedirect(frontendProperties.baseUrl() + frontendProperties.loginFailPage()); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/main/java/com/jobnote/global/config/properties/FrontendProperties.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| package com.jobnote.global.config.properties; | ||
|
|
||
| import org.springframework.boot.context.properties.ConfigurationProperties; | ||
|
|
||
| @ConfigurationProperties(prefix = "frontend") | ||
| public record FrontendProperties( | ||
| String baseUrl, | ||
| String mainPage, | ||
| String socialSignUpPage, | ||
| String loginFailPage, | ||
| String resetPasswordPage, | ||
| String localUrl | ||
| ) { | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| app: | ||
| base-url: https://jobnote.p-e.kr | ||
| frontend: | ||
| base-url: https://job-note.vercel.app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.