package com.pwt.netty;


import com.pwt.netty.client.RFIDClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@Configuration
@PropertySource(value = { "classpath:application-netty.yml" })
//@ConfigurationProperties(prefix = "station")
public class RFIDConfig {


    @Value("${rfid_ip}")
    private String host;

    @Value("${rfid_port}")
    private int port;

    @Bean
    public RFIDClient rfidClient() {
        return new RFIDClient(host, port);
    }

}
