forked from sunday-develop/toby-spring
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
관계를 맺어주는 관심사를 분리해보자. 덕분에 MainTest에서는 UserDao가 어떻게 생성되는 지 신경쓰지 않고 사용하면 그만이다.
- Loading branch information
1 parent
c9b4f7d
commit 1ca3a3f
Showing
3 changed files
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.toby.tobyspring.user.dao; | ||
|
||
public class DaoFactory { | ||
public UserDao userDao() { | ||
ConnectionMaker connectionMaker = new DUserConnectionMaker(); | ||
UserDao userDao = new UserDao(connectionMaker); | ||
return userDao; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters