1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.mes.config;
 
import com.mes.tools.SocketUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
 
/**
 * @Author : zhoush
 * @Date: 2024/9/2 15:42
 * @Description:
 */
@Configuration
public class SocketConfig {
 
    @Value("${mes.scan.ip}")
    private String scanIp;
 
    @Value("${mes.scan.port}")
    private Integer scanPort;
 
    @Bean
    public SocketUtil getSocketUtil() {
        return new SocketUtil(scanIp, scanPort);
    }
}