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

即可正常运行

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM