java - spring aop层报错会影响,主程序运行吗?
高洛峰
高洛峰 2017-04-17 17:32:21
0
2
1161

我遇到aop层代码,报错了,主程序本来没有错,但因为aop层报错,直接导致主程序被终止.目前问题代码已经解决,但不知道是什么原理或者原因

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(2)
黄舟

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.

伊谢尔伦

If there is a synchronous operation in aop, if an exception occurs and is not caught, it will affect the main program.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template