If you don't want resolving as page your method's result in controller (annotated by @Controller, not @RestController) you can add @ResponseBody annotation to this method.