Skip to content

Latest commit

Β 

History

History
97 lines (70 loc) Β· 1.9 KB

File metadata and controls

97 lines (70 loc) Β· 1.9 KB

micronaut-demo

A sample project to explore and practice various features of Micronaut.

Table of Contents


About

This project serves as a playground for practicing and testing Micronaut features such as dependency injection, configuration, HTTP server/client, and more.

Features

  • Fast startup and low memory footprint
  • Dependency injection
  • REST API endpoints
  • Configuration management
  • Simple health check endpoint

Requirements

  • Java 17 or newer
  • Gradle (or use the ./gradlew wrapper)

Getting Started

  1. Clone the repository:

    git clone https://github.com/lissam1/micronaut-demo.git
    cd micronaut-demo
  2. Build the project:

    ./gradlew clean build
  3. Run the application:

    ./gradlew run

    The default server will start at http://localhost:8080.

Running the Application

To run quickly, use:

./gradlew run

Testing

Run the tests with:

./gradlew test

Project Structure

micronaut-demo/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main/
β”‚   β”‚   β”œβ”€β”€ java/
β”‚   β”‚   └── resources/
β”‚   └── test/
β”‚       β”œβ”€β”€ java/
β”‚       └── resources/
β”œβ”€β”€ build.gradle
└──

Useful Commands

  • Run application: ./gradlew run
  • Run tests: ./gradlew test
  • Build fat JAR: ./gradlew shadowJar

Further Reading