Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Component("delegate")
- public class GenericDelegate<T> implements GenericInterface<T> {
- private final GenericService<T> service;
- @Autowired
- public GenericImplementation(final GenericService<T> service) {
- this.service = service;
- }
- @Component
- public class UserComponent implements GenericInterface<ConcreteType> {
- private final GenericInterface<ConcreteType> delegate;
- @Autowired
- public UserComponent(
- @Qualifier("delegate")
- final GenericInterface<ConcreteType> delegate) {
- this.delegate = delegate;
- }
Add Comment
Please, Sign In to add comment