@Override
public void onApplicationEvent(ContextRefreshedEvent event) {
//使用该注解 防止两个容器时执行 2次
if(event.getApplicationContext().getParent() == null){
int port = 37775;
logger.info("Spring加载完成.......启动Netty服务,监听端口 {}",port);
new Thread(new NettyServer(port)).start();
}
}-
Notifications
You must be signed in to change notification settings - Fork 0
chengpei/NettyDemo
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
基于Spring-Boot搭建的Netty服务
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published