Skip to content

Commit

Permalink
refactor: Static Import로 변경
Browse files Browse the repository at this point in the history
Response 클래스들에 붙은 SnakeCaseStrategy.class를 static import하여 가독성 향상
  • Loading branch information
songsunkook committed Jan 4, 2024
1 parent fcfce6d commit 77c5c32
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import java.util.List;

import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;

import in.koreatech.koin.domain.dept.model.DeptInfo;
import in.koreatech.koin.domain.dept.model.DeptNum;

@JsonNaming(value = PropertyNamingStrategies.SnakeCaseStrategy.class)
@JsonNaming(value = SnakeCaseStrategy.class)
public record DeptListItemResponse(String name, String curriculumLink, List<Long> deptNums) {

public static DeptListItemResponse from(DeptInfo deptInfo) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package in.koreatech.koin.domain.dept.dto;

import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import static com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy;

import com.fasterxml.jackson.databind.annotation.JsonNaming;

import in.koreatech.koin.domain.dept.model.DeptNum;

@JsonNaming(value = PropertyNamingStrategies.SnakeCaseStrategy.class)
@JsonNaming(value = SnakeCaseStrategy.class)
public record DeptResponse(Long deptNum, String name) {

public static DeptResponse from(DeptNum deptNum) {
Expand Down

0 comments on commit 77c5c32

Please sign in to comment.