* Moved annotations articles to new spring-boot-annotations module
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package com.baeldung.annotations;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class Biker {
|
||||
|
||||
@Autowired
|
||||
@Qualifier("bike")
|
||||
private Vehicle vehicle;
|
||||
|
||||
@Autowired
|
||||
public Biker(@Qualifier("bike") Vehicle vehicle) {
|
||||
this.vehicle = vehicle;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void setVehicle(@Qualifier("bike") Vehicle vehicle) {
|
||||
this.vehicle = vehicle;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user