Questions tagged [get-mapping]

67 questions
0
votes
1 answer

GetMapping, produces and HttpMediaTypeNotAcceptableException

I am trying to add versioning of my rest endpoints. I was following the tutorial found at https://www.springboottutorial.com/spring-boot-versioning-for-rest-services. I am using spring-boot-starter-parent 2.6.2. I created 2…
bkqdad
  • 15
  • 3
0
votes
1 answer

@PathVariable with slashes in middle of @GetMapping, @DeleteMapping URL

I cant solve this problem (@PathVariable with slashes in middle of @GetMapping, @DeleteMapping URL) help me please! URL ex : aaa/test/111/l2323:sdfsd:23423423/bbb - test/111/l2323:sdfsd:23423423 : string variable with slashes - bbb : another…
Jelly
  • 11
  • 2
0
votes
2 answers

Spring Boot @Getmapping returns a 404 whitelabel error page in a very simple project

I am learning spring boot. I created this super simple project, but I keep getting a 404 Whitelabel error page when I try to return an HTML page with the @GetMapping annotation. Here is my only controller: package com.example.springplay; import…
Veritas1832
  • 67
  • 3
  • 14
0
votes
1 answer

Spring MVC @getMapping headers, set value from application properties

I want to set value from application properties for @getMapping headers. I was trying this @GetMapping(path = "/test/classify/{id}", headers = "${partners.api-key}") But it doesn't work. Is it possible to do that? Thanks in advance.
0
votes
1 answer

Pass 2d array in get method

I have to pass a 2d integer array to get REST call. Example:[[1,2,3], [5,10,11]] I can pass it by entering data separately into the parameter like Example: http://localhost:1136/demo?x=3,4,5&x=10,11,12 But I want it to be like ?x=[[1,2,3],…
Anil
  • 133
  • 1
  • 8
0
votes
1 answer

GetMapping in Springboot exclude html files in pathvariable

I have a controller with the following GetMapping @GetMapping(value = "/{path}") public ResponseEntity searchAPI(@PathVariable("path") String API_NAME) but I have to exclude /index.html from this GetMapping I tried like this @GetMapping(value…
0
votes
2 answers

request url with id between two expressions

I'm trying to call a url with an ID between /. The url looks like this: http://localhost:8080/chargeback/v1/dispute/22/events and I need to recover that value 22 in the sysout from controller. I know thats sounds very easy, but in my project i'm…
0
votes
1 answer

Unable to get data from GetMapping - Class Components

I have a class component wherein the data is fetched from the backend and it should render it on the frontend. I have used drag and drop feature of react-beautiful-dnd. Can someone please tell where am I going wrong. Nothing gets rendered. Thank you…
user14854089
0
votes
2 answers

how to capture some parameters using @RequestParam using spring mvc?

Suppose a hyperlink is clicked and an url is fired with the following parameter list myparam1=myValue1&myparam2=myValue2&myparam3=myValue3 . Now how can I capture some of the parameters using @RequestParam in spring mvc? My requirement is I have to…
0
votes
2 answers

GetMapping in spring-boot with 5 PathVariables not working

I have a spring-boot (version 2.2.5.RELEASE) application with a RestController. When I try to do a get request with up to 4 PathVariables it's working. So the following code results in a 200 OK response with the text 'test' in the body. …
Emmy
  • 3,493
  • 2
  • 16
  • 25
0
votes
1 answer

URL Matcher in spring boot with regular expression

I have requirement to handle all request except few with single handler method in spring boot. The valid urls that should be serveed - /test/login /test/dashboard /test/validate/details and the invalid urls that should not be served is -…
Arvind Kumar
  • 459
  • 5
  • 21
0
votes
1 answer

How do I solve this warning in my console in my reactjs app?

My app works as expected but sometimes in my console i get this error that i don't know how to solve
0
votes
0 answers

@RestController @GetMapping does not handle parameter-value with '+'

My controller-class: @RestController @RequestMapping(value = UserRestController.REST_URL, produces = MediaType.APPLICATION_JSON_VALUE) public class UserRestController { @GetMapping public List getByParameter(@RequestParam Map
Jelly
  • 972
  • 1
  • 17
  • 40
0
votes
0 answers

why is my GetMapping Annotation not being recognized

So here is my Controller. First of all, here I have both request methods GET and POST but for some strange reason the GetMapping("/journeys") is not being recognized. @Controller @GetMapping("/journeys") String journeys(Model model ,…
0
votes
1 answer

What is best practice to send single parameter name multiple times in HTTP GET Request (status=Saved&status=Published)?

This is total new module to be added in our application. In Get Request, End user requires data on basis of status Saved as well as Published. The designer suggest to send status like below: posts?status=Saved&status=Published&_sort=date&_order=asc …
fatherazrael
  • 5,511
  • 16
  • 71
  • 155