I have a class annotated with spring Component for example:
@Component public class ImportantClass{ @Autowired private DependentClassIF otherClass;
public interface DependentClassIF {
I use autoscan to detect beans instead of declaring them all in the conf bean file.
I get
org.springframework.beans.factory.BeanInitializationException: The property "otherClass" is required for the Important Information bean
My question is: In autoscan, not spring, make sure all required properties are inserted?
If I remove @Required , it works, but I'm not sure that I understand spring behavior.
Any input is welcome.
thanks
source share