类 SpringEventHandler

java.lang.Object
com.codingapi.springboot.framework.handler.SpringEventHandler
所有已实现的接口:
EventListener, org.springframework.context.ApplicationListener<DomainEvent>

public class SpringEventHandler extends Object implements org.springframework.context.ApplicationListener<DomainEvent>
handler订阅的Spring触发器,在异步的情况下可配置多线程。
  • 字段详细资料

    • THREAD_KEY

      public static final String THREAD_KEY
      异步多线程的KEY 可通过 System.setProperty(THREAD_KEY,"20") 调整线程数
      另请参阅:
  • 构造器详细资料

    • SpringEventHandler

      public SpringEventHandler(List<IHandler> handlers)
  • 方法详细资料

    • onApplicationEvent

      public void onApplicationEvent(DomainEvent domainEvent)
      指定者:
      onApplicationEvent 在接口中 org.springframework.context.ApplicationListener<DomainEvent>