|
I have the following code. Please note that @Microservice annotation is my own extension to weld-se. It is recognized as a CDI bean.
{{ public interface SpecializationMicro { String hello(); }
@Sharp @Microservice public static class SpecializationMicroBean implements SpecializationMicro {
@Override public String hello() { return "normal"; }
}
@Specializes public static class MockSpecializationMicroBean extends SpecializationMicroBean {
@Override public String hello() { return "special"; }
}
@Qualifier @Target( { ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER }
) @Retention(RetentionPolicy.RUNTIME) public @interface Sharp { }
@Retention(RetentionPolicy.RUNTIME) @Documented @Inherited @Named @MicroserviceScoped @Stereotype @Target(ElementType.TYPE) public @interface Microservice { String value() default ""; }
}} When I delete MockSpecializationMicroBean, the original bean SpecializationMicroBean is registered with qualifiers @Sharp and @Any. However, the MockSpecializationMicroBean is registered with qualifiers @Sharp @Default and @Any. I believe the @Default qualifier whould not be there.
|