Skip to content
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

main 병합 #179

Merged
merged 5 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[submodule "devenv/sql"]
path = devenv/sql
url = git@github.com:makevook/vook-sql.git
[submodule "api/src/test/resources/migrate/sql"]
path = api/src/test/resources/migrate/sql
url = git@github.com:makevook/vook-sql.git
[submodule "server/api/src/test/resources/migrate/sql"]
path = server/api/src/test/resources/migrate/sql
url = git@github.com:makevook/vook-sql.git
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse
try {
oAuth2User = VookLoginUser.of(tokenService.validateAndGetUid(token));
} catch (Exception e) {
log.error("JWT validation failed", e);
log.debug("JWT validation failed", e);
response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ public class VookOAuth2UserService extends DefaultOAuth2UserService {
@Override
public OAuth2User loadUser(OAuth2UserRequest userRequest) throws OAuth2AuthenticationException {
OAuth2User oAuth2User = super.loadUser(userRequest);
log.info("OAuth2User: {}", oAuth2User);
log.debug("OAuth2User: {}", oAuth2User);

String registrationId = userRequest.getClientRegistration().getRegistrationId();
OAuth2Response oAuth2Response = toOAuth2Response(registrationId, oAuth2User);
if (oAuth2Response == null) {
log.info("Unsupported registrationId: {}", registrationId);
log.warn("Unsupported registrationId: {}", registrationId);
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ public class GlobalRestControllerAdvice {

@ExceptionHandler(AppException.class)
public ResponseEntity<?> handleAppException(AppException e) {
log.error(e.getMessage(), e);
log.debug(e.getMessage(), e);
String contents = e.getClass().getSimpleName().replace("Exception", "");
CommonApiException badRequest = CommonApiException.badRequest(ApiResponseCode.BadRequest.VIOLATION_BUSINESS_RULE, e, contents);
return ResponseEntity.status(badRequest.statusCode()).body(badRequest.response());
}

@ExceptionHandler(CommonApiException.class)
public ResponseEntity<?> handleCommonApiException(CommonApiException e) {
log.error(e.getMessage(), e);
log.debug(e.getMessage(), e);
return ResponseEntity.status(e.statusCode()).body(e.response());
}

Expand Down
3 changes: 1 addition & 2 deletions server/api/src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,4 @@ service:
accessTokenExpiredMinute: 30 # 30 minutes
refreshTokenExpiredMinute: 10080 # 60 * 24 * 7 == 1 week
logging:
level:
vook.server.api: DEBUG
config: classpath:logback.xml
13 changes: 13 additions & 0 deletions server/api/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<include resource="org/springframework/boot/logging/logback/console-appender.xml" />

<root level="INFO">
<appender-ref ref="CONSOLE" />
</root>

<logger name="vook.server.api" level="DEBUG" />
<logger name="org.hibernate.orm.jdbc" level="TRACE" />

</configuration>