From ba17e544f528ab7a23cb761806475f2ba07a35ff Mon Sep 17 00:00:00 2001 From: seokrae Date: Sun, 14 Nov 2021 04:02:21 +0900 Subject: [PATCH] =?UTF-8?q?spring-toby-3=20[Spring]=202.=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/example/chapter2/dao/UserDao.java | 12 ------------ chapter2/src/test/resources/application-test.yml | 13 ------------- 2 files changed, 25 deletions(-) diff --git a/chapter2/src/main/java/com/example/chapter2/dao/UserDao.java b/chapter2/src/main/java/com/example/chapter2/dao/UserDao.java index b901550..48dab25 100644 --- a/chapter2/src/main/java/com/example/chapter2/dao/UserDao.java +++ b/chapter2/src/main/java/com/example/chapter2/dao/UserDao.java @@ -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; @@ -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(); diff --git a/chapter2/src/test/resources/application-test.yml b/chapter2/src/test/resources/application-test.yml index 582ee6c..7c8e495 100644 --- a/chapter2/src/test/resources/application-test.yml +++ b/chapter2/src/test/resources/application-test.yml @@ -3,11 +3,7 @@ server: spring: profiles: -<<<<<<< HEAD - active: local -======= active: test ->>>>>>> feat/chapter-2-refactor datasource: driver-class-name: com.mysql.cj.jdbc.Driver @@ -15,18 +11,9 @@ spring: 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