How does autowiring work in Spring