Deploying the backend
If you are going to use your own server, the easiest way to deploy the Spring Boot application is to use an executable Java ARchive (JAR) file. If you use Maven, an executable JAR file can be created using the Spring Boot Maven plugin and adding the following lines of code to your pom.xml
file:
<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <executable>true</executable> </configuration> </plugin>
Next, we have to build our project using the mvn clean install
command. You can run a custom maven
command in the Eclipse integrated development environment (IDE) by right-clicking Project in the project explorer, selecting Run as | Maven Build…, and typing clean install
in the Goals...