문제

At work we have a custom ServiceProvider pattern with an annotation for binding services with a spring post-processor.

I wonder if i can check if my binding was correctly done, by using @Required.

The binding is not done by Spring (neither xml or autowiring).

I guess if it's possible, the post processor order has some importance (spring checking required should be processed after our custom binding processor).

Can someone tell me if it's possible and how?

도움이 되었습니까?

해결책

RequiredAnnotationBeanPostProcessor is a PriorityOrdered with order value Integer.MAX_VALUE - 1. Threrefore your postprocessor need to implement PriorityOrdered with the lesser order value to be fired before RequiredAnnotationBeanPostProcessor.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top