I think the main reason why many professional does not switch to annotation-driven dependency injection is that it does not support switching between development/test/produc
@Value annotation doesn't work the way you have tried. It can only give you values in form of String. For what you want to achieve you can try Spring Profiles as suggested by @ShyJ.