package com.cf.imes.module.system.framework.trans.config;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(TransProperties.class)
public class TransConfiguration {

    @Bean
    public TransApi transApi(TransProperties transProperties) {
        return new TransApi(transProperties.getAppId(), transProperties.getSecurityKey(), transProperties.getApiHost());
    }
}
