Skip to content

[2주차] 최형록/[feat] 상세 기능 구현#7

Open
RokChoi wants to merge 1 commit intoLeets-Official:mainfrom
RokChoi:최형록/2주차

Hidden character warning

The head ref may contain hidden characters: "\ucd5c\ud615\ub85d/2\uc8fc\ucc28"
Open

[2주차] 최형록/[feat] 상세 기능 구현#7
RokChoi wants to merge 1 commit intoLeets-Official:mainfrom
RokChoi:최형록/2주차

Conversation

@RokChoi
Copy link
Copy Markdown

@RokChoi RokChoi commented Mar 31, 2025

테스트 결과

Company_테스트

추가 사항

closed #4

@RokChoi RokChoi requested review from rootTiket and soyesenna March 31, 2025 15:05
@RokChoi RokChoi self-assigned this Mar 31, 2025
Comment on lines +4 to +5
username: root
password: root
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

현재는 과제 진행중이라 괜찮지만 추후에는 환경변수로 대체하는 것이 이상적입니다! :)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 알겠습니다!

Comment on lines +163 to +169
return jdbcTemplate.query(sql, (rs, rowNum) -> new Employee(
rs.getLong("id"),
rs.getString("name"),
rs.getLong("department_id"),
rs.getInt("salary"),
rs.getObject("manager_id") != null ? rs.getLong("manager_id") : null
));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RowMapper를 이용할 수도 있어요! 중복되는 Employee 매핑 코드를 줄일 수 있을것 같네요 :):)

참고자료 : https://rlaehddnd0422.tistory.com/91

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

참고하겠습니다:)

Copy link
Copy Markdown
Member

@rootTiket rootTiket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다~! 이번에 노트북 로컬에 mysql을 설치하셨다면 다음에는 docker를 이용해보시는 것도 권장 드려요 !!

Copy link
Copy Markdown

@soyesenna soyesenna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨어요!
SQL을 문자열로 정의하고 query 메서드로 실행하셨군요!
jdbcTemplate에는 query 말고도 여러 메서드가 있습니다!
해당 메서드들을 조금 더 공부해보시면 좋을 것 같아요!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

최형록/[feat] 상세 기능 구현

3 participants