You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2022/02/08 03:03:51 UTC
[GitHub] [servicecomb-java-chassis] yhs0092 commented on issue #2711: 如何不忽视起服务时端口占用问题
yhs0092 commented on issue #2711:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2711#issuecomment-1032163859
## 背景
Java-Chassis 框架(CSE框架)支持用Vert.x做服务器(所谓的**REST over Vert.x模式**); 也支持Tomcat做服务器, 自身作为servlet从Tomcat接请求(所谓的**REST over Servlet模式**).
当用Tomcat做服务器时, 端口由Tomcat监听, Java-Chassis自身不监听端口, 所以Java-Chassis允许在端口被占用的情况下启动.
## 解决方案
如果你希望框架在端口被占用时报错, 可以排除掉 ServiceComb Java-Chassis 的 `transport-rest-servlet` 依赖包, 这样框架就不会支持REST over Servlet模式了, 碰到端口占用会直接报错.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org