장황하거나 중복 코드 구문, 코드 성숙도, 코드 스타일 이슈
This commit is contained in:
@@ -63,7 +63,7 @@ public class RoleUpdateAspect {
|
||||
|| currentRoles.stream().anyMatch(item -> !beforeRoles.contains(item))) {
|
||||
createLog = true;
|
||||
}
|
||||
} else if (currentRoles.size() > 0) {
|
||||
} else if (!currentRoles.isEmpty()) {
|
||||
createLog = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ public class AdminSecurityConfig {
|
||||
List<String> permitPaths =
|
||||
Arrays.stream(PublicAccess.values())
|
||||
.map(PublicAccess::getPath)
|
||||
.collect(Collectors.toList());
|
||||
.toList();
|
||||
|
||||
http.authorizeHttpRequests(
|
||||
(auth) ->
|
||||
|
||||
@@ -2,10 +2,12 @@ package app.module.admin.config.application.security;
|
||||
|
||||
import java.util.Collection;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.userdetails.User;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class AdminUser extends User {
|
||||
private Long seq;
|
||||
private String roleId;
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
package app.module.admin.config.application.util.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.apache.poi.ss.usermodel.IndexedColors;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class ExcelSheetDto {
|
||||
/**
|
||||
* 시트명
|
||||
@@ -36,10 +40,4 @@ public class ExcelSheetDto {
|
||||
this.commaColumns = commaColumns;
|
||||
this.headerBgColors = headerBgColors;
|
||||
}
|
||||
|
||||
public String getSheetName() { return sheetName; }
|
||||
public List<String> getHeaders() { return headers; }
|
||||
public List<List<String>> getData() { return data; }
|
||||
public Set<Integer> getCommaColumns() { return commaColumns; }
|
||||
public Map<Integer, IndexedColors> getHeaderBgColors() { return headerBgColors; }
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ public class ExcelUtil {
|
||||
wb.write(responseOutputStream);
|
||||
wb.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error("[ExcelUtil] generateWithoutPassword: {}", e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public class CreateCellService implements CreateCellPortIn {
|
||||
// 셀 스타일 적용 (null 체크)
|
||||
if (cellConfig.getCellStyle() != null) {
|
||||
cell.setCellStyle(cellConfig.getCellStyle());
|
||||
} else {
|
||||
//} else {
|
||||
// TODO: cellConfig.getCellStyle()이 null인 경우, 워크북에서 새로운 스타일을 생성하거나 기본 스타일을 적용하는 로직 고려
|
||||
// XSSFWorkbook workbook = (XSSFWorkbook) sheet.getWorkbook();
|
||||
// cell.setCellStyle(workbook.createCellStyle());
|
||||
|
||||
@@ -34,9 +34,9 @@ class URICurrentMatchingService implements URICurrentMatchingPortIn {
|
||||
// {{pathVar}} 을 가진 URI 라면 배열검증 수행
|
||||
if (comparePath.endsWith("/{{pathVar}}")) {
|
||||
List<String> pathComponents =
|
||||
Arrays.stream(comparePath.split("/")).collect(Collectors.toList());
|
||||
Arrays.stream(comparePath.split("/")).toList();
|
||||
List<String> targetComponents =
|
||||
Arrays.stream(targetUri.split("/")).collect(Collectors.toList());
|
||||
Arrays.stream(targetUri.split("/")).toList();
|
||||
|
||||
if (pathComponents.size() != targetComponents.size()) {
|
||||
return false;
|
||||
|
||||
@@ -69,7 +69,7 @@ public class FrontSecurityConfig {
|
||||
List<String> publicAccess =
|
||||
Arrays.stream(PublicAccess.values())
|
||||
.map(PublicAccess::getPath)
|
||||
.collect(Collectors.toList());
|
||||
.toList();
|
||||
|
||||
// front - 익명 사용자 접근 허용 URI 등록 (admin 과 달리 공개/비공개 URL 이 존재한다)
|
||||
FrontPublicAccess.getInstance().setURIs(List.of("/", "/user/register", "/policy/**"));
|
||||
|
||||
@@ -2,10 +2,12 @@ package app.module.front.config.application.security;
|
||||
|
||||
import java.util.Collection;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.userdetails.User;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class FrontUser extends User {
|
||||
|
||||
private String nickname;
|
||||
|
||||
@@ -70,7 +70,7 @@ public class DailyRecordController {
|
||||
*/
|
||||
@PostMapping(path = "/{searchMonth}/{groupNo}/today-none")
|
||||
ResponseEntity<?> todayNone(@PathVariable("searchMonth") String searchMonth, @PathVariable("groupNo") String groupNo
|
||||
, @RequestParam(name = "target", required = true, defaultValue = "") String targetType
|
||||
, @RequestParam(name = "target", defaultValue = "") String targetType
|
||||
, @RequestParam(name = "status", required = false, defaultValue = "N") String targetStatus) {
|
||||
|
||||
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
||||
|
||||
@@ -12,7 +12,6 @@ import java.util.List;
|
||||
@EqualsAndHashCode
|
||||
public class CreateBankInputReqVO {
|
||||
|
||||
|
||||
// private Boolean status;
|
||||
private Long id;
|
||||
private String transferType;
|
||||
@@ -22,9 +21,4 @@ public class CreateBankInputReqVO {
|
||||
return bankList != null ? bankList : new ArrayList<>();
|
||||
}
|
||||
|
||||
public void setBankList(List<CreateBankInputProductReqVO> bankList) {
|
||||
this.bankList = bankList;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -11,8 +11,6 @@ import java.util.List;
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode
|
||||
public class CreateMonthlyReqVO {
|
||||
|
||||
|
||||
private Boolean status;
|
||||
private Long id;
|
||||
private List<CreateMonthlyProductReqVO> productList;
|
||||
@@ -20,10 +18,4 @@ public class CreateMonthlyReqVO {
|
||||
public List<CreateMonthlyProductReqVO> getProductList() {
|
||||
return productList != null ? productList : new ArrayList<>();
|
||||
}
|
||||
|
||||
public void setProductList(List<CreateMonthlyProductReqVO> productList) {
|
||||
this.productList = productList;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user