No description
Find a file
2025-09-24 10:44:37 +02:00
.junie add button to manually add a domain 2025-07-09 12:04:18 +02:00
gradle/wrapper first commit 2025-07-02 12:55:11 +02:00
src/main add a button to relaunch migration 2025-09-24 10:44:37 +02:00
.gitignore first commit 2025-07-02 12:55:11 +02:00
build.gradle move to jwt token cookie & add localhost passthrough to allow nginx reverse proxy 2025-07-07 11:51:52 +02:00
gradlew first commit 2025-07-02 12:55:11 +02:00
gradlew.bat first commit 2025-07-02 12:55:11 +02:00
README.md first commit 2025-07-02 12:55:11 +02:00
settings.gradle first commit 2025-07-02 12:55:11 +02:00

Minimal Micronaut Application

This is a minimal Micronaut application (version 4.9.0) with server-side rendering using Pebble templates and H2 database integration.

Features

  • Micronaut 4.9.0
  • Server-side rendering with Pebble template engine
  • H2 in-memory database
  • Simple book library example

Requirements

  • Java 21 or higher
  • Gradle 8.14.2 or higher

Running the Application

To run the application, execute:

./gradlew run

The application will start on port 8080.

Accessing the Application

Open your browser and navigate to:

http://localhost:8080/books

This will display a list of books stored in the H2 database.

Project Structure

  • src/main/java/com/example/Application.java - Main application class
  • src/main/java/com/example/controller/BookController.java - Controller for handling HTTP requests
  • src/main/java/com/example/model/Book.java - Entity class for books
  • src/main/java/com/example/repository/BookRepository.java - Repository interface for database operations
  • src/main/resources/views/books.peb - Pebble template for rendering the book list
  • src/main/resources/application.yml - Application configuration
  • src/main/resources/logback.xml - Logging configuration

Database

The application uses an H2 in-memory database that is initialized with sample data when the application starts.