java异常处理,统一处理的异常日志没有生效
api请求报错信息:
控制台报错信息:
Servlet.service() for servlet [dispatcherServlet] in context with path [/financial-data] indi.grant.financial.data.exception.RestException: null
通常的处理:
1.Service层实现类未添加注解@Autowired
2.@RestController使用成了@Controller,或者没有@ResponseBody
这里的原因:
异常统一处理没有修改包的名称,导致统一处理没有生效抛出到了控制台