我遇到aop层代码,报错了,主程序本来没有错,但因为aop层报错,直接导致主程序被终止.目前问题代码已经解决,但不知道是什么原理或者原因
黄舟2017-04-17 17:34:21
AOP essentially uses proxies or bytecode addition technology to add new business logic to the business logic in three ways: pre-positioning, post-positioning, and wrapping, without having to immerse in the original business logic when writing code. Runtime exceptions in the AOP interceptor will directly affect the processing of the original business logic.
If you want to avoid exceptions in the AOP code without affecting the main business logic, you only need to use try...catch in the AOP code for packaging.
伊谢尔伦2017-04-17 17:34:21
If there is a synchronous operation in aop, if an exception occurs and is not caught, it will affect the main program.