A sample project to explore and practice various features of Micronaut.
- About
- Features
- Requirements
- Getting Started
- Running the Application
- Testing
- Project Structure
- Useful Commands
- Further Reading
This project serves as a playground for practicing and testing Micronaut features such as dependency injection, configuration, HTTP server/client, and more.
- Fast startup and low memory footprint
- Dependency injection
- REST API endpoints
- Configuration management
- Simple health check endpoint
- Java 17 or newer
- Gradle (or use the
./gradlewwrapper)
-
Clone the repository:
git clone https://github.com/lissam1/micronaut-demo.git cd micronaut-demo -
Build the project:
./gradlew clean build
-
Run the application:
./gradlew run
The default server will start at http://localhost:8080.
To run quickly, use:
./gradlew runRun the tests with:
./gradlew testmicronaut-demo/
├── src/
│ ├── main/
│ │ ├── java/
│ │ └── resources/
│ └── test/
│ ├── java/
│ └── resources/
├── build.gradle
└──
- Run application:
./gradlew run - Run tests:
./gradlew test - Build fat JAR:
./gradlew shadowJar