Skip to content

Commit b3e1e25

Browse files
authored
release 1.2.2
release 1.2.2
2 parents d3fc39a + 4d19566 commit b3e1e25

File tree

7 files changed

+23
-205
lines changed

7 files changed

+23
-205
lines changed

module-api/src/main/java/com/mile/config/FilterConfig.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,12 @@
22

33

44
import com.mile.common.filter.MDCLoggingFilter;
5-
import com.mile.exception.log.filter.CustomServletWrappingFilter;
65
import org.springframework.boot.web.servlet.FilterRegistrationBean;
76
import org.springframework.context.annotation.Bean;
87
import org.springframework.context.annotation.Configuration;
98

109
@Configuration
1110
public class FilterConfig {
12-
@Bean
13-
public FilterRegistrationBean<CustomServletWrappingFilter> secondFilter() {
14-
FilterRegistrationBean<CustomServletWrappingFilter> filterRegistrationBean = new FilterRegistrationBean<>(
15-
new CustomServletWrappingFilter());
16-
filterRegistrationBean.setOrder(0);
17-
return filterRegistrationBean;
18-
}
1911

2012
@Bean
2113
public FilterRegistrationBean<MDCLoggingFilter> thirdFilter() {

module-api/src/main/java/com/mile/controller/user/UserController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ public ResponseEntity<SuccessResponse<AccessTokenGetSuccess>> login(
5757

5858
@GetMapping("/refresh-token")
5959
@Override
60-
@UserAuthAnnotation(UserAuthenticationType.USER)
6160
public SuccessResponse<AccessTokenGetSuccess> refreshToken(
6261
@CookieValue(name = REFRESH_TOKEN) Cookie cookie
6362
) {

module-api/src/main/java/com/mile/exception/log/aspect/LoggingAspect.java

Lines changed: 0 additions & 83 deletions
This file was deleted.

module-api/src/main/java/com/mile/exception/log/filter/CustomServletWrappingFilter.java

Lines changed: 0 additions & 23 deletions
This file was deleted.

module-api/src/main/java/com/mile/exception/log/filter/wrapper/CachedBodyRequestWrapper.java

Lines changed: 0 additions & 37 deletions
This file was deleted.

module-api/src/main/java/com/mile/exception/log/filter/wrapper/CachedBodyServletInputStream.java

Lines changed: 0 additions & 46 deletions
This file was deleted.

module-domain/src/main/java/com/mile/common/lock/DistributedLock.java

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,47 @@
22

33
import com.mile.exception.message.ErrorMessage;
44
import com.mile.exception.model.MileException;
5+
import com.mile.slack.module.SendErrorModule;
56
import lombok.RequiredArgsConstructor;
7+
import lombok.extern.slf4j.Slf4j;
68
import org.redisson.api.RLock;
79
import org.redisson.api.RedissonClient;
10+
import org.redisson.client.RedisException;
811
import org.springframework.stereotype.Component;
912

1013
import java.util.concurrent.TimeUnit;
1114

1215
@RequiredArgsConstructor
1316
@Component
17+
@Slf4j
1418
public class DistributedLock {
1519

1620
private final RedissonClient redissonClient;
21+
private final SendErrorModule sendErrorModule;
1722

1823
public void getLock(final String key) {
19-
final RLock lock = redissonClient.getLock(key);
20-
try {
21-
checkAvailability(lock.tryLock(3, 4, TimeUnit.SECONDS));
22-
} catch (InterruptedException e) {
23-
throw new RuntimeException(e);
24+
try{
25+
final RLock lock = redissonClient.getLock(key);
26+
try {
27+
checkAvailability(lock.tryLock(2, 3, TimeUnit.SECONDS));
28+
} catch (InterruptedException e) {
29+
throw new RuntimeException(e);
30+
}
31+
} catch (RedisException e) {
32+
log.error("레디스 락 획득 중 에러 발생");
33+
sendErrorModule.sendError(e);
2434
}
2535
}
2636

2737
public void afterLock(final String key) {
28-
final RLock lock = redissonClient.getLock(key);
29-
lock.unlock();
38+
39+
try {
40+
final RLock lock = redissonClient.getLock(key);
41+
lock.unlock();
42+
} catch (RedisException e) {
43+
log.error("레디스 락 해제 중 에러 발생");
44+
sendErrorModule.sendError(e);
45+
}
3046
}
3147

3248
public void checkAvailability(final Boolean available) {

0 commit comments

Comments
 (0)