question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@PathVariable issue

See original GitHub issue

Hi, I’m trying to use the path variable feature like this, but it throws

net.kaczmarzyk.spring.data.jpa.web.InvalidPathVariableRequestedException: Requested path variable {parentId} is not present in Controller request mapping annotations

What I’m trying @RequestMapping(method = RequestMethod.GET, path = "/{parentId}/translations/{translationId}/meta/search") public ResponseEntity<List<MetaDetailResponseDto>> search( @Conjunction(value = { @Or(value = @Spec(path = "metaType", params = {"meta_type"}, spec = Equal.class)) }, and = @Spec(path = "entity_id", pathVars = "parentId", spec = Equal.class)) Specification<MetaDetail> specification) { return ResponseEntity.status(HttpStatus.OK).body(this.adminDestinationTranslationMetaDetailService.search(specification)); }

it is an issue or am I doing anything wrong?

Kind Regards, Sithira

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
YoliNikolovacommented, Jul 30, 2021

Hello, i still have this problem with v2.6.2, did you find a solution? (problem with PathVariable)

0reactions
alphana-devcommented, May 24, 2022

+++ Hello, i still have this problem with v2.6.2, did you find a solution? (problem with PathVariable)

Read more comments on GitHub >

github_iconTop Results From Across the Web

spring boot - @PathVariable is simply not working
Well I found the issue. I have to add @PathVariable annotation in the implementation method as well. I only had it in the...
Read more >
Spring MVC @PathVariable with a dot (.) gets truncated
In this short tutorial, we'll discuss a common problem when working with Spring MVC – when using a Spring @PathVariable with a ...
Read more >
GetMapping and @PathVariable: not detected during parsing
Hi, using these SpringWeb Framework annotation, the enunciate output format doesn't catch well the path variable arguments.
Read more >
Inspection "Spring MVC @PathVariable" fails if ...
The inspection of the following code causes a warning "Cannot resolve path variable 'id' in @RequestMapping": @RequestMapping(Mappings.CREATE) public String ...
Read more >
Spring @PathVariable - Why is value truncated after the last ...
Spring @PathVariable default mapping will truncates values after the last (.)dot, to fix it, we use regex mapping.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found