Spring Boot with AngularJS

前端 未结 1 654
无人共我
无人共我 2020-12-22 11:08

I have a Spring Boot project using Jersey as my REST service and using AngularJS for my front end development. While I run it without using any controller and go to index.ht

相关标签:
1条回答
  • 2020-12-22 12:04

    This is because you annotated your controller with @RestController, which is a shorthand for @Controller with @ResponseBody. The latter annotation instructs the controller to render the output as-is directly into the response.

    Use @Controller for controllers that are not RESTful instead.

    0 讨论(0)
提交回复
热议问题