1、错误描述

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

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

 

 

 (2)程序实现

Controller的注解是:

@Controller

访问的Controller的方法是:

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

 

2、解决方式

将注解改为:

@RestController

即可正常运行

 

相关文章:

  • 2021-08-16
  • 2021-11-18
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2021-12-05
  • 2021-06-06
  • 2021-09-27
猜你喜欢
  • 2021-10-19
  • 2021-07-02
  • 2022-12-23
  • 2021-06-05
  • 2021-05-12
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案