Created
January 5, 2015 12:38
-
-
Save sizovs/8c1bb777286a8cc888d4 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
interface Validator | |
validate(Q) | |
@Qualifier | |
@Inherited | |
@interface V1Annotation { | |
} | |
@Component | |
@V1Annotation | |
class V1 impl Val | |
@Component | |
class V2 impl Val | |
@Component | |
class V3 impl Val | |
@Component | |
class CompositeValidator implements Validator { | |
@Autowired | |
Collection<Validator> validators | |
validate() { | |
forEach(validators:validate) | |
} | |
} | |
class Client { | |
@Autowired | |
@V1Annotation | |
Validator validator | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment