zoukankan      html  css  js  c++  java
  • axon controller 不能获取 event里面自定义 exception 的解决方式

    配置:

    @Configuration
    public class MyAxonConfiguration extends EventHandlingConfiguration{
    
    @Bean
    public EventHandlingConfiguration eventHandlingConfiguration(EventHandlingConfiguration config) {
    config.configureListenerInvocationErrorHandler(c -> c.getComponent(ListenerInvocationErrorHandler.class, MyErrorHandlerImpl::new));
    return config;
    }
    }@Component
    public class MyErrorHandlerImpl implements ListenerInvocationErrorHandler{
    
    private static final Logger LOGGER = getLogger(MyErrorHandlerImpl.class);
    
    @Override
    public void onError(Exception exception, EventMessage<?> event, EventListener eventListener) throws Exception {
    LOGGER.info("☋☋☋☋☋☋☋☋☋☋☋☋ Start MyErrorHandlerImpl ☋☋☋☋☋☋☋☋☋☋☋☋");
    
    throw exception;
    }
    }
  • 相关阅读:
    CSS的三种定位方式介绍(转载)
    CSS背景颜色透明
    去除网页滚动条的方法
    es6
    Android复习
    caculater
    字符流
    字节流
    File类
    泛型继承
  • 原文地址:https://www.cnblogs.com/lshan/p/11313183.html
Copyright © 2011-2022 走看看