I have a number of beans implementing an interface and I'd like them all to have the same @PostConstruct. I've added the @PostConstruct
annotation to my interface method, then added to my bean definitions:
<bean class="com.MyInterface" abstract="true" />
But this doesn't seem to be working. Where am I going wrong if this is even possible?
edit: I've added the annotation to the interface like this:
package com;
import javax.annotation.PostConstruct;
public interface MyInterface {
@PostConstruct
void initSettings();
}