Spring type FW is often adopted in SIer, but Micronaut is influenced by existing famous FW, so the introduction barrier seems not to be so high and it is a technology that overcomes the drawbacks of existing FW. A memo after the investigation.
A modern JVM-based full-stack microservices framework designed for building microservices applications. Micronaut provides all the functionality to build microservices. At the same time, it provides the following to avoid the shortcomings of frameworks like Spring, Spring Boot, and Grails:
Although it seems that it is not suitable for the SI industry due to its business model, it is designed for microservices.
--Java 8 or higher SDK is included --Install Micronaut CLI with SDKMAN
$ curl -s "https://get.sdkman.io" | bash
$ source "$HOME/.sdkman/bin/sdkman-init.sh"
$ sdk update
$ sdk install micronaut 1.1.0.M1
--features file-watch has auto-reload function
$ mn create-app my-app --features file-watch
$ cd my-app
$ ./gradlew run --continuous
HelloController.java
import io.micronaut.http.MediaType;
import io.micronaut.http.annotation.Controller;
import io.micronaut.http.annotation.Get;
@Controller("/hello")
public class HelloController {
@Get(produces = MediaType.TEXT_PLAIN)
public String index() {
return "hello world!!";
}
}
http://localhost:8080/hello Hello world !! is displayed by accessing. It detects file changes and restarts. It doesn't start up anymore, and I don't feel any lightness.
https://docs.micronaut.io/1.1.0.M1/guide/index.html
Recommended Posts