项目(SpringBoot)中有个需求,要开启一个TCP连接的监听,要求在系统启动的时候就开启监听。
@PostConstruct
public void init(){
//System.out.println("随系统启动 >>>>>");
//...
}
项目(SpringBoot)中有个需求,要开启一个TCP连接的监听,要求在系统启动的时候就开启监听。
@PostConstruct
public void init(){
//System.out.println("随系统启动 >>>>>");
//...
}