I have a bean:
My understanding is that XML configuration overrides annotation config.The fact that autowire="byType" specified overrides the auto injection, which looks for a presence of setter method for injecting the dependency.