Java / Micronaut Interview questions
How do you create a Micronaut application?
The fastest path is Micronaut Launch (launch.micronaut.io) or the equivalent mn create-app CLI command, which scaffolds a project with your chosen build tool (Gradle or Maven), language (Java, Kotlin, Groovy), and starter features such as Micronaut Data or Security.
mn create-app com.example.orders-service \ --features=data-jdbc,postgres,http-client \ --build=gradle
This generates a project with an Application.java main class that calls Micronaut.run(Application.class, args), along with application.yml for configuration, a build file with the correct annotation-processor wiring already configured, and a starter test.
From there you add @Controller classes, @Singleton services, and configuration as needed, then run it with ./gradlew run or ./mvnw mn:run.
More Related questions...