Use @Value annotation on field to have property value loaded by spring cloud config server doesn't work

239 Views Asked by At

I am trying to use spring config server to load additional properties on my application. I would like to be able to use @Value annotation on field to load values from config server file but i don't know why it doesn't work. I am using version 1.2.0 of spring cloud config client and io.spring.platform-2.0.8 (becouse i have Spring MVC, not springboot here)

Exception I am getting is just IllegalArgumentException and message is about placeholder that cannot be found. When i try to get this property via org.springframework.core.env.Environment.getProperty(propertyName) everything works fine and the value is simply recognized so i dunno why @Value doesn't work

0

There are 0 best solutions below