Lets say I have the following classes
@Data
@Component
public class Student {
@Autowired
private Vehicle vehicle;
}
public interface Vehicle{}
@Component
public Jeep implements Vehicle{}
@Component
public Van implements Vehicle{}
How does Spring Boot know which type of Vehicle to put in my Student object?
I know Guice has Modules which defines exactly how a certain object is built with @Provides and @Singleton coupled with @Inject in the classes that require the object.
Does Spring Boot have the same thing?