public class PortUtils
extends java.lang.Object
public static int findPort(org.springframework.beans.factory.BeanFactory beanFactory)
org.springframework.boot.context.embedded.AbstractConfigurableEmbeddedServletContainer#getPort()
for springboot 1.x;
Note: see org.springframework.boot.web.server.AbstractConfigurableWebServerFactory#getPort()
for springboot 2.xbeanFactory - beanFactoryShenyuException - when can not find portpublic static java.lang.Integer getPort()
throws java.lang.Exception
java.lang.Exception - when failed to get portCopyright © 2022 The Apache Software Foundation. All rights reserved.