Bad redirecting of SpringBoot with Angular5

0

I have this route with Angular5 - >

 <a href="http://localhost:8090/ml/download/true/{{data.data}}">

@RequestMapping(method = RequestMethod.GET, path = "/{download}/{data}/{nameFile}", produces = MediaType.APPLICATION_JSON_VALUE)
    public  void download(HttpServletResponse response, @PathVariable("data") Boolean data,
            @PathVariable("nameFile") String nameFile) {

And I pick it up successfully in SpringBoot.

But if I add 1 parameter to the Angular5 URL and change my SpringBoot to receive it - >

<a href="http://localhost:8090/ml/download/true/{{data.data}}/201801">

@RequestMapping(method = RequestMethod.GET, path = "/{download}/{data}/{nameFile}/{period}", produces = MediaType.APPLICATION_JSON_VALUE)
    public  void download(HttpServletResponse response, @PathVariable("data") Boolean data,
            @PathVariable("nameFile") String nameFile, @PathVariable("period") String period) {

I discovered that if I commented on the -> driver.

@RequestMapping("/**/{path:[^\\.]+}")
    public String redirect(HttpServletResponse response) throws IOException {
        return "forward:/index.html";
    }

If I mention all this, it works fine, but I need this driver ...

    
asked by EduBw 24.08.2018 в 14:24
source

0 answers