0

我有一个 HandlerExceptionResolver 类

@Service
public class GlobalHandlerExceptionResolver implements HandlerExceptionResolver{

    @Override
    public ModelAndView resolveException(HttpServletRequest req, HttpServletResponse resp,Object handler, Exception ex){
        return new ModelAndView("/error", "message","UH OH!!!!");
    }


}

我被告知需要对包进行组件扫描,我该怎么做?

4

0 回答 0