我制作了一个应用程序,它公开了一些 REST api(使用 Jersey JAX-RS 实现)。现在,当我在 heroku 上部署“war”时,API 无法访问。
我变了 http://localhost:8080/myProjectNameInEclipse/webapi/ * 到 --> http://myAppNameInHeroku.herokuapp.com/myProjectNameInEclipse/webapi/ *
但此后 URL 将无法再访问。任何人都可以指导我在服务器上部署时重命名 URL(尤其是在 Heroku 上)
最佳答案
The web process must listen on one and only one port. The port must be the one specified in the $PORT variable. If your process listens on other ports, it will be shut down by Heroku.
关于java - 在heroku上部署Java应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37572052/