Skip to content

Latest commit

 

History

History

basic

basic

This is a "Hello World" Micronaut CLI program.

Overview

An effective way to start learning a new framework is with a basic example. This is a so-called "Hello World" program implemented in Java and the Micronaut. I scaffolded this with the Micronaut mn CLI and adapted it from there.

Instructions

Follow these instructions to build and run the program.

  1. Use Java 21
  2. Build and run the app:
    • ./gradlew run
  3. Build and run the tests:
    • ./gradlew test
  4. Build the app distribution and then run it:
    • ./gradlew installDist
    • ./build/install/basic/bin/basic
    • The output should look like this:
      $ ./build/install/basic/bin/basic
      00:36:42.830 [main] INFO  i.m.c.DefaultApplicationContext$RuntimeConfiguredEnvironment - Established active environments: [cli]
      00:36:42.875 [main] INFO  d.basic.BasicApplication$MyFactory - Hello world!
      

Wish List

General clean-ups, TODOs and things I wish to implement for this project:

  • DONE Convert to Gradle Kotlin DSL
  • DONE Remove web server and just make the app say "hello world"
  • DONE Upgrade to Java 11
  • GitHub Actions CI build
  • DONE Upgrade to Micronaut 3
  • DONE Upgrade to Micronaut 4

Reference