I have a RestController
, now I wrote a DELETE
method with @PathVariable
:
@RestController("/msisdns")
public class MsisdnsController {
@DeleteMapping("/{msisdnToUnReserve}")
public String unreserveMsisdin(@PathVariable String msisdnToUnReserve) { ... }
}
Bult always get the same error... :
I´ve tried with:
@DeleteMapping("/{msisdnToUnReserve}")
public String unreserveMsisdin(@PathVariable("msisdnToUnReserve") String msisdnToUnReserve)
or
@RequestMapping(value = "/{msisdnToUnReserve}", method = RequestMethod.DELETE)
public String unreserveMsisdin(@PathVariable("msisdnToUnReserve") String msisdnToUnReserve)
and more but always the same error, I can´t reach the method
Any help?
This is my Zuul.yml, how should be trnslato URI?
PD: /trasnlator
is configured in Zuul with Spring Cloud Netflix.
I've experienced a similar problem when I don't specify the produces
or consumes
. You can try if that fixes the problem. Choose the proper type (JSON in my example):
@DeleteMapping(value = "/{msisdnToUnReserve}", produces = org.springframework.http.MediaType#APPLICATION_JSON_VALUE)