在Heroku上部署战争所需的步骤 [英] Steps needed to deploy war on Heroku
本文介绍了在Heroku上部署战争所需的步骤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有Maven的spring源码工具。我有一个我想在Heroku上部署的Java项目。
有人可以告诉我在Heroku上部署的步骤吗?
I have spring source tool with Maven. And I have one Java project which I want to deploy on Heroku. Can anybody tell me steps to deploy on Heroku?
很多谢谢
Many Thanks
推荐答案
- 在Maven中创建 war 文件。您可以通过引用此处来完成此操作
- 从 here
- 打开命令提示符(对于Windows)并键入
$ heroku login
它会提示输入用户名和密码。输入您的heroku帐户的凭证。 - 现在,要安装 heroku-deploy 插件,请输入以下代码:
$ heroku插件:安装heroku-cli-deploy
- 现在将 war 文件部署到 heroku服务器
$ heroku deploy:war --war< path_to_war_file> --app< app_name>
- 如果您位于应用程序目录中,
- app
参数可省略:
$ heroku deploy:war --war
- Create war file in Maven. You can do this by referring here
- Install the Heroku Toolbelt from here
- open the command prompt (for Windows) and type
$heroku login
it will prompt to enter user name and password. Enter the credentials of your heroku account. - Now, to install the heroku-deploy plugin, enter the code:
$ heroku plugins:install heroku-cli-deploy
- Now deploy the war file to the heroku server by this code:
$ heroku deploy:war --war <path_to_war_file> --app <app_name>
- If you are in an application directory, the
--app
parameter can be omitted:$ heroku deploy:war --war <path_to_war_file>
您的应用程序将成功部署到heroku服务器。
Your App will be successfully deployed to the heroku server.
这篇关于在Heroku上部署战争所需的步骤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文