1.获取可用端口工具类
import java.net.InetAddress;
import java.net.Socket;
import java.util.Random;public class ServerPortUtil {private static final int MAX_PORT 65535;private static final int MIN_PORT 8000;public static String getAvailablePort() {Random…
同事自己在自己的电脑上写了一些小东西,遇到了请求时API层注入的Service为空问题。整体代码接口伪代码如下:
public Interface ParentService{public String hello(String msg);
}
public abstract class ChildrenOneService implements ParentService…