Skip to content

Commit

Permalink
spring-toby-3 [Spring] 2. 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
SeokRae committed Nov 13, 2021
1 parent 5d6a2ae commit ba17e54
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
12 changes: 0 additions & 12 deletions chapter2/src/main/java/com/example/chapter2/dao/UserDao.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,14 @@ public User get(String id) throws SQLException {

User user = null;

<<<<<<< HEAD
if(rs.next()) {
=======
if (rs.next()) {
>>>>>>> feat/chapter-2-refactor
user = new User();
user.setId(rs.getString("id"));
user.setName(rs.getString("name"));
user.setPassword(rs.getString("password"));
}

<<<<<<< HEAD
if(user == null) {
=======
if (user == null) {
>>>>>>> feat/chapter-2-refactor
throw new EmptyResultDataAccessException(1);
}
return user;
Expand All @@ -62,11 +54,7 @@ public User get(String id) throws SQLException {
public int getCount() throws SQLException {
try (
Connection c = dataSource.getConnection();
<<<<<<< HEAD
PreparedStatement ps = c.prepareStatement("SELECT COUNT(*) FROM USERS");
=======
PreparedStatement ps = c.prepareStatement("SELECT COUNT(*) FROM USERS")
>>>>>>> feat/chapter-2-refactor
) {
ResultSet rs = ps.executeQuery();
rs.next();
Expand Down
13 changes: 0 additions & 13 deletions chapter2/src/test/resources/application-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,17 @@ server:

spring:
profiles:
<<<<<<< HEAD
active: local
=======
active: test
>>>>>>> feat/chapter-2-refactor

datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3309/user-db
username: root
password: 1234

<<<<<<< HEAD
logging:
level:
org:
hibernate:
sql: debug
type: trace
=======
#logging:
# level:
# org:
# hibernate:
# sql: debug
# type: trace
>>>>>>> feat/chapter-2-refactor

0 comments on commit ba17e54

Please sign in to comment.