-
Notifications
You must be signed in to change notification settings - Fork 472
Closed
Description
I wanted to create custom mapping based on some spring property. What I did was adding the spring property to RequestMapping like this:
@RequestMapping(value = "/api/${property.version}", produces = HAL_JSON_VALUE)
My application.properties contains only this property:
property.version=v2
And if I start the service I can see that the property has been resolved:
Mapped "{[/api/v2/hello],methods=[GET],produces=[application/hal+json]}" onto public com.test.hateos.testhateos.domain.Message com.test.hateos.testhateos.controller.HomeController.hello()
However the generated self link for my resource does not resolve this property:
"_links": {
"self": {
"href": "http://localhost:8080/api/${property.version}/hello"
}
}
I was expecting that the property will be resolved in the self link too.
See my test project attached.
You can find a failing test regarding this problem.
Metadata
Metadata
Assignees
Labels
No labels