package com.tofly.common.oauth.feign;

import com.tofly.base.api.feign.BaseUserLoginService;
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/11/4  11:06
 */
@EnableAsync
@Configuration
@AllArgsConstructor
@ConditionalOnWebApplication
public class UserLoginConfiguration {
    private final BaseUserLoginService baseUserLoginService;

    @Bean
    public UserLoginListener userLoginListener() {
        return new UserLoginListener(baseUserLoginService);
    }

}
