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 trying fix that w/ other programmers for many time. Maybe some configuration i forgot.
Interface:
@RequestMapping("/dispute")
public interface disputeEvents{
@GetMapping( value = "/{id}/events")
ResponseEntity<Void> getDisputeEvents(@RequestParam Long id);
}
controller:
@Controller
public class testeController implements disputeEvents{
@Override
public ResponseEntity<Void> getDisputeEvents(Long id) {
System.out.println(id);
return null;
}
}