Skip to content

WebMvcLinkBuilder's linkTo and methodOn doesn't evaluate ${} #1360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lmtoo opened this issue Sep 8, 2020 · 5 comments
Open

WebMvcLinkBuilder's linkTo and methodOn doesn't evaluate ${} #1360

lmtoo opened this issue Sep 8, 2020 · 5 comments

Comments

@lmtoo
Copy link

lmtoo commented Sep 8, 2020

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

@agbilotia1998
Copy link

Observing same issue, any workaround for this?

@agbilotia1998
Copy link

Hi @lmtoo the issue seems to be resolved in hateoas version 1.2.2 maybe you can try using that.

@jpoisso
Copy link

jpoisso commented Jan 28, 2022

We're having the same issue in 1.4.0 as well.

@chakradev
Copy link

please share workaround if any

@ckdrunix
Copy link

ckdrunix commented Nov 9, 2023

If you are using spring boot PR #1411 (not yet merged) probably would adress this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants