Required annotation and bean inheritance
Hi,
I have two bean classes Parent and Child, where Child extends Parent. Parent has a field -- parentField -- with a public getter/setter marked as @Required. In the spring config xml a Child bean is defined. The @Required annotation, however, is not enforced if parentField is not set. I have tried defining an abstract bean in the config xml for the Parent class and specifying it as the parent of the Child bean, but this does not work either. @Required enforces things properly for fields defined within the Child class. Does anyone know whether this is supposed to be supported? I can work around it fine by checking in a @PostConstruct method.
Thanks in advance..
Jerry