Framework
Java / Spring Boot
Spring Boot applications built with Maven and run on Eclipse Temurin JRE 21.
8080Requirements
pom.xml in the repo root
DropDeploy uses Maven (mvn package) to build. Gradle is not yet supported.
Spring Boot with embedded Tomcat
The JAR must be self-executable. Standard Spring Boot starters include this.
App listens on port 8080
Spring Boot defaults to 8080. Do not change server.port unless you also update the Dockerfile.
Demo app
A minimal app that is ready to push and deploy. Copy the files below into a new repository, commit, and deploy — it should go live without any changes.
Quickstart
Go to start.spring.io — select Maven, Java 21, add Spring Web dependency, and download.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.0</version>
</parent>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>demo</name>
<properties>
<java.version>21</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>package com.example.demo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}package com.example.demo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloController {
@GetMapping("/")
public String hello() {
return """
<html>
<body style="font-family:system-ui;display:flex;justify-content:center;
align-items:center;min-height:100vh;margin:0;
background:#0f172a;color:#f1f5f9">
<div style="text-align:center">
<h1 style="color:#ef4444">Hello from DropDeploy!</h1>
<p style="color:#94a3b8">Spring Boot app is live.</p>
</div>
</body>
</html>
""";
}
@GetMapping("/api/health")
public java.util.Map<String, String> health() {
return java.util.Map.of("status", "ok");
}
}Build & start commands
DropDeploy runs these steps inside the container when you click Deploy.
mvn dependency:go-offline -q mvn package -DskipTests -q java -jar target/*.jar
Environment variables
Set these in Project → Env Vars in the dashboard. Never commit secrets.
| Variable | Required | Description |
|---|---|---|
| SPRING_DATASOURCE_URL | No | JDBC connection string (e.g. jdbc:postgresql://host:5432/db). |
| SPRING_DATASOURCE_USERNAME | No | Database username. |
| SPRING_DATASOURCE_PASSWORD | No | Database password — always via env var. |
| SERVER_PORT | No | Defaults to 8080. Change only if you update the Dockerfile accordingly. |
Common issues
Build takes 5–10 minutes on first deploy
mvn dependency:go-offline downloads all deps. Docker caching makes future deploys faster.
Multiple JARs in target/
Maven outputs both the main JAR and original-*.jar. COPY target/*.jar fails if multiple exist. The spring-boot-maven-plugin should produce just one executable JAR by default.
Tests failing during build
DropDeploy passes -DskipTests so tests do not run. Run tests locally before deploying.