I'm tried to call a get http response with spring boot, and I have a value of url in application.properties, I'm tried to call this value in annotation @GetMapping like that :
@GetMapping("${service.url}")
But Spring boot says "Cannot resolve @PathVariable service.url"
Maybe there are another way to get this value ?
Thanks for your help everyone.
In your
Controller
class, you can pass an object of typeorg.springframework.core.env.Environment
in the constructor, e.g. named env.Then you can just call