<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>AOP - 标签 | 飞污熊小站</title><link>https://xiongneng.me/tags/aop/</link><description>飞污熊小站</description><generator>Hugo 0.166.0 &amp; FixIt v0.4.6-20260512073637-464c4659</generator><language>zh-CN</language><managingEditor>yidao620@163.com (XiongNeng)</managingEditor><webMaster>yidao620@163.com (XiongNeng)</webMaster><copyright>XiongNeng</copyright><lastBuildDate>Fri, 25 Sep 2026 02:16:47 +0000</lastBuildDate><atom:link href="https://xiongneng.me/tags/aop/index.xml" rel="self" type="application/rss+xml"/><item><title>SpringBoot4系列16 - 使用AOP</title><link>https://xiongneng.me/posts/java/springboot/sb4-aop/</link><pubDate>Thu, 22 Oct 2026 20:00:00 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb4-aop/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;我给订单服务定过一个小目标：每个接口统计耗时、关键操作留审计、下单支付防重复提交。这三件事都不难，难在它们跟业务一点关系都没有。没有切面的写法是把它们复制进每个方法：&lt;code&gt;System.currentTimeMillis()&lt;/code&gt; 抬头低头各一次，审计字段在返回前手动塞库，幂等靠前端按钮置灰。我见过三个月后的下场：没人说得清哪些接口漏了计时，审计表里缺哪天的行，重复提交打穿库存的客诉截图还挂在群里。这三件事的共性是它们不属于任何业务方法，属于「所有方法都要过一遍」的横切关注点，切面正是为这类代码准备的。&lt;/p&gt;</description></item></channel></rss>