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