inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

찬솔님의 게시글

찬솔 찬솔

@bodan958014

수강평 작성수
-
평균평점
-

게시글 3

질문&답변

No test were found 질문

file>setting>gradle에서 runtestusing도 intellij로 모두 바꿔줬습니다. 근데 회원가입 외에 testfile을 전체로 실행시키면 동작합니다. 회원가입 내의 findMember도 member에서 Member로 수정해줬습니다. 확인해보니 class명을 한글에서 영어로 고치면 정상 작동했습니다. file encoding 과 console encoding 모두 utf-8로 바꿨는데 뭐가 문젠지 잘 모르겠습니다 ㅠㅠ

좋아요수
0
댓글수
3
조회수
279

질문&답변

findByID 소스 오류

감사합니다. 엄청 간단한거였네요 ㅠㅠ

좋아요수
0
댓글수
3
조회수
480

질문&답변

findByID 소스 오류

@Override public Optional findByID(Long id) { String sql = "select * from member where id = ?"; Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; try { conn = getConnection(); pstmt = conn.prepareStatement(sql); pstmt.setLong(1, id); rs = pstmt.executeQuery(); if(rs.next()) { Member member = new Member(); member.setId(rs.getLong("id")); member.setName(rs.getString("name")); return Optional.of(member); } else { return Optional.empty(); } } catch (Exception e) { throw new IllegalStateException(e); } finally { close(conn, pstmt, rs); } } 잘못올렸었습니다 findByID는 다음과 같습니다

좋아요수
0
댓글수
3
조회수
480