使用springboot上傳圖片的時候,錯誤提示
Circular view path [test]: would dispatch back to the current handler URL [/upload/test] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
錯誤原因:返回頁面用@Controller,要想返回數據就用@RestController
把@controller改爲@RestController就可以了;