static 변수, 메소드
https://kadosholy.tistory.com/95
내부 클래스를 static으로 선언하는 이유를 확실히 알아라.
public class BoardDto {
@Getter
@Builder
public static class BoardInfo extends BaseRes{
@ApiModelProperty(value = "게시판 번호", example = "1", required = true)
private Long bbsNo;
@ApiModelProperty(value = "게시판명", example = "게시판명", required = true)
private String bbsNm;
@ApiModelProperty(value = "삭제여부", example = "N", required = true)
private String delYn;
public static BoardInfo of(Board board) {
BoardInfo boardInfo = BoardInfo.builder()
.bbsNo(board.getBbsNo())
.delYn(BooleanToYnUtils.boolToYn(board.getDelYn()))
.bbsNm(board.getBbsNm())
.build();
boardInfo.setBaseRes(board);
return boardInfo;
}
}
}
https://johngrib.github.io/wiki/java/inner-class-may-be-static/
https://dkswnkk.tistory.com/444
final 변수, 메소드, 클래스 확실히 알기
private static final Logger logger = LogManager.getLogger(MemberController.class);
https://advenoh.tistory.com/13
'Back-end > Java Language' 카테고리의 다른 글
JAVA의 Jar와 war의 차이점 (1) | 2024.10.12 |
---|---|
Java Wrapper class (0) | 2023.01.29 |
Java Optional, Stream (0) | 2023.01.29 |
@JsonIgonore, @JsonProperty, @JsonNaming & Jackson Object Mapper (0) | 2023.01.07 |
Exception Handling (0) | 2023.01.01 |