简体   繁体   English

将 Spring 引导应用程序部署到 Heroku

[英]Deploying Spring Boot application to Heroku

I am trying to deploy Spring Boot application to Heroku but I am not able to do that.我正在尝试将 Spring 引导应用程序部署到 Heroku 但我无法做到这一点。 My application is automatically get detected as "heroku-maven-plugin" but i want to deploy it as Java Application.我的应用程序被自动检测为“heroku-maven-plugin”,但我想将其部署为 Java 应用程序。

How can I achieve this?我怎样才能做到这一点?

I got the answer for this issue.我得到了这个问题的答案。

  • Added system.properties file at the root folder path在根文件夹路径添加 system.properties 文件

    java.runtime.version=14
  • deployed app through heroku-cli-deploy通过 heroku-cli-deploy 部署应用程序

    Step 1: mvn clean Step 2: mvn build Step 3: heroku deploy:jar target/*.jar --app <app-name>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM