Basic examples on cdi and beans validation
This commit is contained in:
15
test1_cdi/StudentAlternative2.java
Normal file
15
test1_cdi/StudentAlternative2.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package test1_cdi;
|
||||
|
||||
/**
|
||||
* Created by Giovanni on 26/04/2015.
|
||||
*/
|
||||
import javax.enterprise.inject.Alternative;
|
||||
|
||||
@Alternative @StudentI(implementation = student_implementations.two)
|
||||
public class StudentAlternative2 implements Student {
|
||||
|
||||
@Override
|
||||
public String getinfo() {
|
||||
return "i'm an alternative 2";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user