Last active
August 29, 2015 14:01
-
-
Save dwelch2344/1407364bd2776f6bae0d to your computer and use it in GitHub Desktop.
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
@Configuration | |
public class SampleConfig<T> { | |
@Bean | |
public Service<T> service(){ | |
return new Service<T>(repo()); | |
} | |
@Bean | |
public Repository<T> repo(){ | |
return new Repository<T>(); | |
} | |
} |
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
public class Foo{ | |
public void someMethod(){ | |
someSpringObject.addConfiguration( new SampleConfig<User>() ); | |
someSpringObject.addConfiguration( new SampleConfig<Organization>() ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment