With Spring wiring, if I have multiple implementations of an interface, I can use @Qualifier to specify which one I want.
E.g., assuming that I have a
Ah, the solution is actually quite simple:
@Component @Qualifier("Bmv") @Profile("!dev") public class Bmv implements Car
and
@Component @Qualifier("Toyota") @Profile("dev") public class Toyota implements Car
This way, the wiring of Car will use Toyota for dev environment, and Bmv otherwise.