从发布请求在Spring Boot中加载静态页面(Angular组件)

时间:2019-02-18 12:19:29

标签: angular spring-boot

我有一个第三方应用程序,该应用程序通过。,POST调用Spring-boot应用程序(MVC控制器),并希望返回静态页面(角度应用程序)。使用HTTP GET时,Angular应用正确加载。但是,在POST时,不允许使用其返回方法(HTTP 405)

@Controller{
public class myController {

  @RequestMapping(value="/home", method={RequestMethod.GET, RequestMethod.POST})
  public String mymainpage(HttpServletRequest req, HttpServletResponse resp) {
    return "index.html"
  }
}

0 个答案:

没有答案