实现Aop拦截器
- 首先在
Domain.Shared
中创建Interceptors
文件夹。
- 创建
LogInterceptor
日志拦截类和LogAttribute
特性类。代码结构如下:
[Dependency(ServiceLifetime.Transient)]
public class LogInterceptor : AbpInterceptor
{
public override async Task InterceptAsync(IAbpMethodInvocation invocation)
{
Console