Search code examples
javagauge

Using @Value with Gauge framework


How can I use @Value with static Application context?

I built application using gauge spring demo https://github.com/getgauge-examples/ioc-spring.

App is started using AnnotationConfigApplicationContext, look at RegisterIOC.java in demo.

I want to use @Value in this project, but @Value do not see application.yml properties and i have exception:

Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder

Is there a way to customize this project and use @Value in it?


Solution

  • I didn't find solution with aplication.yml, but i created folder env/default/default.properties Gauge found properties and I was able to use @Value