运行ExceptionAdvisor类后,结果如下: ************************************ Error happened in class: TestBean Error happened in method: method1 Exception class: java.lang.Exception ************************************* ************************************* Error happened in class: TestBean Error happened in method: changeToNumber arg[0]: amigo Exception class: java.lang.NumberFormatException ************************************* 在工程中,可将ExceptionAdvisor类作为bean定义,并指定要纳入其进行异常拦截的类。