Add jbang: single-file Java with JBang 0.132.1 on JDK 25 (deps, compact source files, Spring Boot, templates, native)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b6ZEVHGaYy15HAxRzy
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
7c677a39d2
commit
ddc3ec9d90
@@ -0,0 +1,29 @@
|
||||
//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=8090 -Dspring.main.banner-mode=off
|
||||
|
||||
|
||||
|
||||
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 SpringDefaultPackage {
|
||||
|
||||
@GetMapping("/hello")
|
||||
String hello() {
|
||||
return "Hello from a single-file Spring Boot app";
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(SpringDefaultPackage.class, args);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user