0

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

  • Wild guess, you are loading the properties after the application has started, which is too late. The `@Value` stuff needs to be resolved very early on in the proces. – M. Deinum Nov 26 '21 at 13:15
  • Hi lotto, It might be helpful to post the first ten lines of stack dump. Also, please post the code of the of the property and annotation you think is causing the exception. Good luck! – devdanke Dec 01 '21 at 12:36

0 Answers0