报错内容:
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Tue May 11 16:28:32 CST 2021
There was an unexpected error (type=Internal Server Error, status=500).
报错原因及解决方案:
经过一段时间的尝试与探索,找到了解决的办法:
把@Controller改为@RestController即可。
@Controller会把返回信息当作url处理。
@RestController把信息直接作为content返回。
问题解决,信息成功返回: