//JAVA 25+ //DEPS org.springframework.boot:spring-boot-dependencies:4.2.0@pom //DEPS org.springframework.boot:spring-boot-starter-webmvc //RUNTIME_OPTIONS -Dserver.port=8089 -Dspring.main.banner-mode=off package demo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; /** * A whole Spring Boot web application in a single file. The BOM (@pom) pins every * Spring Boot dependency, so the starter needs no version of its own. */ @SpringBootApplication @RestController public class SpringApp { @GetMapping("/hello") String hello() { return "Hello from a single-file Spring Boot app"; } public static void main(String[] args) { SpringApplication.run(SpringApp.class, args); } }