code-examples/2025/03/jbang_demo1/OldApp.java

20 lines
438 B
Java

///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS org.wildfly.bom:wildfly-expansion:35.0.1.Final@pom
//DEPS jakarta.ws.rs:jakarta.ws.rs-api
//DEPS jakarta.enterprise:jakarta.enterprise.cdi-api
import jakarta.enterprise.context.*;
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.*;
@ApplicationPath("/")
@ApplicationScoped
public class App extends Application {
@Path("/hello")
public String handleHello() {
return "OK";
}
}