Skip to content

Commit

Permalink
Merge pull request #179 from makevook/release
Browse files Browse the repository at this point in the history
main 병합
  • Loading branch information
seungyeop-lee committed Jul 23, 2024
2 parents eb8e8bd + 557a4ce commit cb8c3e6
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 10 deletions.
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>

0 comments on commit cb8c3e6

Please sign in to comment.