Java SpringBoot Project Deployment
Overview
Rainbond supports building and automatically recognizing single-module and multi-module SpringBoot projects.It also supports projects built with Gradle.
Java Gradle
The platform defaults to recognizing a project as a Java Gradle project if there is a gradlew file or build.gradle in the root directory of the source code.
Java Maven Single Module
When a pom.xml
file exists in the root directory of the source code, Rainbond will recognize the source code as a Java Maven single-module project.
Java Maven Multi-module
Rainbond's recognition of Maven projects is based on the content of the pom.xml
file, mainly divided into two parts: build command and startup command.
- Build Command: Tells the system which modules need to be built.Similar to running
mvn install -pl 'module name' -am
, where-pl
specifies the module to be built, and-am
means that if the module has dependencies, they will also be built. - Startup Command: After the build is completed, specify which Jar package to execute to start the service.Similar to
web: java $JAVA_OPTS -jar *.jar
, where*.jar
will be replaced with the actual Jar package name.
Recognition Rules:
- Module Location: First, find the submodule's POM file according to the
modules
tag in the root POM file. - Packaging Type: If the
packaging
tag inpom.xml
isjar
orwar
, the module name and the generated Jar package name will be extracted.If thepackaging
type is not specified, it is consideredjar
by default. - Module Name: The module name is composed of the value of the
module
tag in the parent POM file, separated by slashes/
, such asrbd-worker/rbd-thirdparty
. - Jar Package Name: By default, the generated Jar package name is
${artifactId}-*.jar
(where*
represents the version number).IffinalName
is set in the POM file, the value infinalName
will be used.If variables (such as${project.name}
or${project.artifactId}
) are used infinalName
, the actual values of the variables will be used to replace them. - POM Module: If the
packaging
in POM ispom
, and there are multiplemodule
in this POM file, then each submodule will be recursively parsed according to the above rules.
Deploying Java SpringBoot Multi-module Projects
- Based on source code deployment components, fill in the following information:
Content | |
---|---|
Component Name | Custom |
Component English Name | Custom |
Repository Address | https://gitee.com/zhangbigqi/RuoYi-Vue.git |
Code Version | Master |
- Enter multi-module build, check the ruoyi-admin module, this module is runnable, other modules are dependencies.
- Go to Component -> Port to delete the default 5000 port, add 8080 http port.
- Wait for the build to complete.
Deploying Java SpringBoot Single Module Projects
Go to the team, create a new application, select Based on source code example for building, select Java Maven Demo and default all the next steps.
Deploying Java Gradle Projects
- Based on source code deployment components, fill in the following information:
Content | |
---|---|
Component Name | Custom |
Component English Name | Custom |
Repository Address | https://gitee.com/rainbond/java-gradle-demo.git |
Code Version | Master |
- Next all defaults, wait for the build to complete.