CLI 자바 서비스 만들기 - 송민혁#6
Open
m1nhy2uk wants to merge 71 commits into
Open
Conversation
Added project overview, features, and class structure to README.
- App에서 사용하기위해
- App을 실행
- 뷰를 분리할 예정
- 유틸클래스에 들어가기엔 page,pageable,Rq 셋다 안어울린다고 생각하였기에
- 명령어가 많아지니 switch문은 가독성이 떨어진다고 판단 - 하여 initCommandMap으로 미리 명령어와 해당 실행 구문을 map에 담고 꺼내오는 방식으로 변경
- ArticleView 분리를 통한 UI 로직 캡슐화 - ArticleController에서 executeWithId를 사용하여 중복로직 제거 - 컨테이너에서 의존성 주입 수정 -> 컨트롤러에 뷰 주 주입 - 테스트 코드 수정
- Msg 클래스를 도입하여 한곳에서 관리하도록 함 - 하드코딩된 문자열을 상수로 대체하여 유지보수성 향상
- https://www.toptal.com/developers/gitignore에서 macOs,inteliJ,Gradle 적용
CLI 자바 서비스 만들기 - 정용현
|
전체적으로 코드가 굉장히 간결하고 읽기 쉽게 잘 작성된 것 같습니다! |
|
과제에서 제시한 예시 내용을 활용해 잘 구현하신것 같습니다. 고생하셨습니다! |
kjh3165
reviewed
Apr 17, 2026
| private void doDetail(int id) { | ||
| articleService.increaseCount(id); | ||
| Article article = articleService.showDetail(id); | ||
| if (article != null) { |
There was a problem hiding this comment.
increaseCount 메소드도 이 블럭에 넣는게 좋지 않을까 하는 생각이 듭니다.
| } | ||
| } | ||
| } | ||
| } |
0-0v
reviewed
Apr 17, 2026
There was a problem hiding this comment.
현재 switch문은 break가 반복되고 있어서 (->) 문법을 사용하면 더 간결하게 표현할 수 있을 것 같습니다!
0-0v
reviewed
Apr 17, 2026
There was a problem hiding this comment.
필드에 직접 접근하는 방식보다는 article.getId()처럼 getter를 활용해 캡슐화하면 더 좋은 구조가 될 것 같습니다!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 Java CLI 게시판
Java 콘솔 기반의 텍스트 게시판 프로그램입니다.
📁 폴더 구조
📌 명령어 요약
writelistviewdetail [id]update [id]delete [id]exit💬 실행 예시
게시글 작성
게시글 목록
조회수순 게시글 목록
게시글 상세보기
게시글 수정
게시글 삭제
프로그램 종료