import org.springframework.boot.context.embedded.EmbeddedServletContainerInitializedEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Configuration;
import org.springframework.util.Assert;
/**
* @author jiangzeyin
* @create 2017 02 14 12:44
*/
@Configuration
public class ServiceInfoUtil implements ApplicationListener<EmbeddedServletContainerInitializedEvent> {
private static EmbeddedServletContainerInitializedEvent event;
@Override
public void onApplicationEvent(EmbeddedServletContainerInitializedEvent ev
Spring Boot / Spring Cloud 项目中获取本项目端口号
最新推荐文章于 2024-06-28 17:01:04 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)