* Moved annotations articles to new spring-boot-annotations module

This commit is contained in:
dupirefr
2020-02-13 18:23:27 +01:00
parent 577596a503
commit d4c4ec95c6
18 changed files with 17 additions and 1 deletions

View File

@@ -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;
}
}