Spring Boot-Angular - Entering Url in Address Bar results in 404

后端 未结 3 1817
鱼传尺愫
鱼传尺愫 2020-12-17 04:15

Need help on the basics - I have integrated Angular and Spring Boot. I made production build of the Angular app and copied the 6 files in the Spring boot static resource fo

3条回答
  •  囚心锁ツ
    2020-12-17 04:56

    // the perfect solution(from jhipster)
    @Controller
    public class ClientForwardController {
        @GetMapping(value = "/**/{path:[^\\.]*}")
        public String forward() {
            return "forward:/";
        }
    }
    

提交回复
热议问题