package org.wfc.user.api.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.wfc.user.api.IWifiApi;
import org.wfc.user.api.omada.OmadaWifiApi;

/**
 * @description: API 自动装配
 * @author: cyc
 * @since: 2024-12-30
 */
@Configuration
public class WifiApiAutoConfig {

    @ConditionalOnProperty(prefix = "wifi.api", name = "name", havingValue = "omada", matchIfMissing = true)
    @Bean
    public IWifiApi omadaApi() {
        return new OmadaWifiApi();
    }

}
