i need to autowire the following beans to a list, and i need my list to be orderd this is how i'm doing it
@Service
@Order(1)
public class Slave1 implements Slave{}
@Service
@Order(2) //instead of hardcoding i need the value to be picked up externally
public class Slave2 implements Slave{}
@Autowire
List<Slave> slaves;
and i want the order value to be fetched from the application.properties file, is this possible, can i set a value to @order annotation from a property file.
Aucun commentaire:
Enregistrer un commentaire