Created
February 28, 2015 01:28
-
-
Save SeongUgJung/510437b16c0f27bcb729 to your computer and use it in GitHub Desktop.
지역변수 DI 하기..
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
void doSomething () { | |
IUserSessionDao dao = getUserSessionDao(isParents); | |
// 생략 | |
} | |
IUserSessionDao getUserSessionDao(boolean isParents) { | |
IUserSessionDao userSessionDao; | |
if (isParents) { | |
userSessionDao = (IUserSessionDao) applicationContext.getBean("parentUserSessionKeyDao"); | |
} else { | |
userSessionDao = (IUserSessionDao) applicationContext.getBean("childUserSessionKeyDao"); | |
} | |
return userSessionDao; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment