-
-
Save tivrfoa/d1d82f16f6859e5e420747fdcbaff9cb to your computer and use it in GitHub Desktop.
Micronaut JBang Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///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