package com.tofly.common.oauth.feign;

import com.tofly.base.api.feign.FlowableService;
import lombok.AllArgsConstructor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * @author tuonbed
 * @date 2019/12/3  16:36
 */
@EnableAsync
@Configuration
@AllArgsConstructor
@ConditionalOnWebApplication
public class FLowableFeignConfiguration {

    private final FlowableService flowableService;

    @Bean
    public FlowableListener getFlowableListener(){
        return new FlowableListener(flowableService);
    }
}
