54 Matching Annotations
  1. Jul 2025
  2. Jun 2025
    1. Default Background Job Manager

      Default implementation: First in, first out, retry or timeout after failure, the timeout is two days, and the retry time increases by one minute each time, sort by priority first and then by number of times in ascending order

    2. Cancelling Background Jobs

      Use ICancellationTokenProvider to exit the background task and it will continue execution when it is restarted. If you don't want to execution you can return directly.

    1. Enable/Disable for Other Services

      You can use the [Audited] and [DisableAuditing] data annotation identify the class, or inherit the IAuditingEnabled interface

    2. AlwaysLogSelectors

      即使方法未启用审计功能(未标记 [Audited],或不在 AppService 中),只要其所在的类或方法匹配了 AlwaysLogSelectors 中的规则,ABP 也会记录一次审计日志。

    3. DisableLogActionInfo

      是否记录每个方法调用的详细信息(Action Info),也就是 AbpAuditLogActions 表中那一条条“方法调用明细”。

    1. IValidationEnabled Interface

      如果你想要在 AppService 层或 Domain Service 层实现参数自动验证,不需要每次手动调用 Validator.Validate(),只要你:

      参数 DTO 上加好 [Required] 或 FluentValidation;

      类实现 IValidationEnabled;

      方法定义为 public virtual;

      这种方式针对,软件内部调用

    1. AbpExceptionHandlingOptions

      在模块范围内配置 SendStackTraceToClients 错误消息是否输出堆栈 SendExceptionsDetailsToClients 错误详细信息是否输出。如果这个值 设置为false 上面的 SendStackTraceToClients 设置为 true也没用

    2. Logging

      Error 级别的日志会被自动记录。也可以继承IHasLogLevel接口标识记录或者继承IExceptionWithSelfLogging 在异常中手动记录

    1. The main difference is the ICachedServiceProvider is itself registered as scoped, while the ITransientCachedServiceProvider is registered as transient to the dependency injection system.

      ICachedServiceProvider 在不同的作用域中返回同一个对象,ITransientCachedServiceProvider 在同一个对象中返回同一个对象

    2. In any case, you can create a service scope block to safely and immediately release services:

      如果是应用程序需要指定scope否则资源会一直不释放

    3. Exposed Services by Convention

      满足默认注册的类会通过接口名筛选哪些接口可以使用。如果类的名字包含接口名的会关联上。接口名前面的I会省略

    1. AbpDbConnectionOptions

      如果使用特定的名字配置连接字符串,框架会自动加载配置,也可以用代码指定。 如果模块没有找到相关的连接字符串,会默认使用 default 的连接字符串

    1. Unit Of Work Level Cache

      为了防止数据被缓存后,数据库中数据回滚导致缓存无效。设置 considerUow 为 true 时,只有工作单元提交成功了缓存才有效。