spring-hateoas
spring-hateoas copied to clipboard
WebMvcLinkBuilder's linkTo and methodOn doesn't evaluate ${}
I defined a RestController ,which annotated with @RequestMapping("${infrastructure.endpoints.project.base-path:/api/v1/projects}") , but when I use this controller to generate Link , list.add(linkTo(methodOn(ProjectController.class).list()).withRel(PROJECTS));
I got link like this
"projects": { "href": "http://localhost:8085/inspection${infrastructure.endpoints.project.base-path:/api/v1/projects}" },
infrastructure.endpoints.project.base-path
did'nt evaluate with the Environment
Observing same issue, any workaround for this?
Hi @lmtoo the issue seems to be resolved in hateoas version 1.2.2
maybe you can try using that.
We're having the same issue in 1.4.0 as well.
please share workaround if any
If you are using spring boot PR #1411 (not yet merged) probably would adress this issue