Created
May 7, 2013 13:19
-
-
Save debop/5532500 to your computer and use it in GitHub Desktop.
UnitOfWorks
This file contains hidden or 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
| package example.spring.staticinjection; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.stereotype.Component; | |
| @Component | |
| public class UnitOfWorks { | |
| private static UnitOfWorkFactory unitOfWorkFactory; | |
| /** | |
| * Spring가 UnitOfFactory 를 인젝션을 수행합니다. | |
| * | |
| * @param factory | |
| */ | |
| @Autowired | |
| public void setUnitOfWorkFactory(UnitOfWorkFactory factory) { | |
| unitOfWorkFactory = factory; | |
| } | |
| public static UnitOfWorkFactory getUnitOfWorkFactory() { | |
| return unitOfWorkFactory; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment