260212_01_DOC: 프로젝트 전체에 구글 java 스타일 적용
This commit is contained in:
@@ -1,20 +1,19 @@
|
||||
package com.kri.common.webmvc;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.web.util.matcher.IpAddressMatcher;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public class IpAccessControlService {
|
||||
|
||||
private final KriIpAccessProperties properties;
|
||||
private final KriIpAccessProperties properties;
|
||||
|
||||
public boolean isAccessible(String ipAddress) {
|
||||
List<String> cidrs = properties.getEffectiveCidrs();
|
||||
public boolean isAccessible(String ipAddress) {
|
||||
List<String> cidrs = properties.getEffectiveCidrs();
|
||||
|
||||
return cidrs.stream()
|
||||
.map(IpAddressMatcher::new)
|
||||
.anyMatch(matcher -> matcher.matches(ipAddress));
|
||||
}
|
||||
return cidrs.stream()
|
||||
.map(IpAddressMatcher::new)
|
||||
.anyMatch(matcher -> matcher.matches(ipAddress));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user