Circular view path [h]: would dispatch back to the current handler URL [/h] again

1、错误描述

(1)在书写一个SpringBoot的项目的时候出现如下错误

 (2)程序实现

Controller的注解是:

@Controller

访问的Controller的方法是:

  @RequestMapping("h")
    public void nihao(){
       System.out.println("nihao");
  }

2、解决方式

将注解改为:

@RestController

即可正常运行

原文地址:https://www.cnblogs.com/zhai1997/p/14001536.html