Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Micronaut JBang Example
///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS io.micronaut:micronaut-bom:2.5.4@pom
//DEPS io.micronaut:micronaut-http-server-netty
//DEPS io.micronaut:micronaut-inject-java
//DEPS org.slf4j:slf4j-simple
package app;
import io.micronaut.http.annotation.*;
import io.micronaut.runtime.Micronaut;
public class App {
public static void main(String... args) {
Micronaut.run(args);
}
}
@Controller("/hello")
class HelloController {
@Get("/")
String hello() {
return "Hello world";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment