
Micronaut looks a lot like Spring for routes, but it has different tricks up its sleeve. This example highlights Micronaut’s ahead-of-time (AOT) compilation for fast startups:
import io.micronaut.http.MediaType;
import io.micronaut.http.annotation.Controller;
import io.micronaut.http.annotation.Get;
import io.micronaut.http.annotation.Produces;
@Controller("/hello")
public class HelloController {
@Get(produces = MediaType.TEXT_PLAIN)
public String index() {
return "Hello, InfoWorld from Micronaut!";
}
}
Quarkus
Like Micronaut, Quarkus focuses on cloud-native development. Quarkus is more of an opinionated-style framework, with strong command-line interface (CLI) support for devmode and container-aware packaging. One of Quarkus’ strengths is in streamlining and empowering the command-line experience. Here, we use it to create a new application and run it in hot-swap devmode:
# New Quarkus project with the RESTEasy extension
mvn io.quarkus.platform:quarkus-maven-plugin:2.16.0.Final:create
-DprojectGroupId=org.acme
-DprojectArtifactId=my-quarkus-app
-Dextensions="resteasy"
cd my-quarkus-app
# Run the application in dev mode
./mvnw compile quarkus:dev
--
Tests paused
Press [e] to edit command line args (currently ''), [r] to resume testing, [o] Toggle test output, [:] for the terminal, [h] for more options>
JHipster
JHipster is possibly the most expansive and ambitious framework on this list. It covers an enormous range of flexibility including both SQL and NoSQL back-end datastores, all within the Java and JVM ecosystem.