일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- pointcut
- 백준
- 그리디
- Spring Boot
- db
- 김영한
- AOP
- 인프런
- JPQL
- 스프링 핵심 기능
- Exception
- spring
- 자바
- Android
- springdatajpa
- Greedy
- SpringBoot
- Proxy
- QueryDSL
- java
- transaction
- http
- kotlin
- Servlet
- jpa
- 알고리즘
- 스프링 핵심 원리
- JDBC
- 스프링
- Thymeleaf
- Today
- Total
목록connection (10)
개발자되기 프로젝트
JDBC를 사용해서 회원(Member)데이터를 관리하는 기능을 개발한다. Member package hello.jdbc.domain; import lombok.Data; @Data public class Member { private String memberId; private int money; public Member() { } public Member(String memberId, int money) { this.memberId = memberId; this.money = money; } } MemberRepositoryV0 - 회원 등록 Statement: SQL을 그대로 전달 PreparedStatement: Statement상속 받음, 파리미터 바인딩 가능. package hello.jdbc...
ConnectionConst package hello.jdbc.connection; public abstract class ConnectionConst { public static final String URL = "jdbc:h2:tcp://localhost/~/dbtest"; public static final String USERNAME = "sa"; public static final String PASSWORD = ""; } DB에 접속하는데 필요한 기본 정보를 편리하게 사용하도록 상수로 만들었다. 이 때 해당 클래스는 객체로 생성하지 못하도록 abtract로 막아두었다. DBConnectionUtil package hello.jdbc.connection; import lombok.extern.s..