In a Java 17 app, is it possible to send an endpoint string from the frontend to the backend...

Discussão em 'Angular' iniciado por Tim, Abril 14, 2025.

  1. Tim

    Tim Guest

    I have an Angular front-end app that needs to send the following endpoint string to a Java 17 backend.

    Note the | character towards the end.

    http://localhost:8080/revision/2609?filter=ruleNumber|4


    And here's the endpoint in the backend:

    @GetMapping(value = "/revision/{revisionId:[0-9][0-9]*}", produces =
    MediaType.APPLICATION_JSON_VALUE)
    public ResponseEntity getHazardBlock(@PathVariable("revisionId") Long revisionId,
    @RequestParam(value = "filter", required = false) String filter) throws ServiceException {


    This worked fine when the backend was running off of Java 1.8. The @RequestParam "filter" came through as 'ruleNumber|4'.

    Now that I've upgraded to Java 17, however, it can't even find the backend endpoint.

    It's definitely dying on the | character. As long as I don't include the | character it hits the endpoint fine.

    And yes, I have to do the upgrade to Java 17 and there has to be a | character in the value.

    Any suggestions?

    Thanks much.

    Continue reading...

Compartilhe esta Página