简体   繁体   中英

How to deploy SpringBoot project on Heroku?

My SpringBoot project consists of several modules. This is an example project structure:

---Application(packaging pom)
--------Main A(packaging jar)   
--------Module B(packaging jar)
--------Module C(packaging jar)
   pom.xml

Module A is the main. It has only one class that runs the project(SpringBootApplication). Other modules just use each other's dependencies.The module A uses the dependencies of all other modules.

How can I set up the project correctly so that I can deploy to Heroku if the SpringBootApplication in the Module A?

您可以通过运行将 Maven 项目(即子模块)设置为 Maven 选项:

$ heroku config:set MAVEN_CUSTOM_OPTS="-pl Main"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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