
Build multiple microservices with Micronaut, including a product rest api, data access with Micronaut data, messaging with Apache Kafka, WebSockets, and GraalVM native mode.
Explore Micronaut, a modern JVM based full stack framework for modular, easily testable microservices and serverless apps, with magnadata for data access and fast startup via compile-time optimizations.
Explore a framework comparison of spring, micronaut, and quarkus for cloud native java apps, focusing on efficiency, startup time, graalvm native images, and serverless readiness.
Meet the instructors, Danielle and Cristian, who bring Java and Micronaut expertise from Bitpanda and Austria's largest marketplace for certified ads to cloud-native microservices with AWS, Kubernetes, and Kafka.
Discover the source code on the GitHub repository named Micronaut Udemy and configure your Intalex or Visual Studio Code environment with Docker Desktop for Micronaut v4 projects.
Generate your first micronaut application using the micronaut launch web tool, configure java 17, micronaut 4.0, and gradle kotlin dsl, then download, unzip, and open the project in IntelliJ.
Inspect your first Micronaut application by opening the project, building with Gradle, and running the server on localhost:8080 while reviewing the source structure, main class, build.gradle, and configuration.
Create a hello world rest API in a Micronaut app by using annotation processing, an http get endpoint at /hello that returns hello world as text/plain, and run on localhost:8080.
Learn how Micronaut tests inject dependencies and verify a hello world rest API with the Micronaut http client. Practice blocking requests, asserting status code 200, and validating hello world response.
Configure your development environment for Micronaut by enabling annotation processing in IntelliJ, Eclipse, or Visual Studio Code. Ensure Maven or Gradle builds compile with the correct settings.
Build and run executable jar files using gradle or maven, learn the assemble and clean tasks, and locate the jar in libs or target to run with java -jar.
Build and run docker containers for Micronaut cloud native microservices using Gradle or Maven, expose port 8080, and verify a hello world endpoint.
Upgrade a Micronaut four application from 4.0 to 4.2 using the Gradle versions plugin. Update the Micronaut version in Gradle properties and build.gradle, then verify startup on localhost:8080.
Learn to upgrade a Micronaut project with Maven using the versions plugin to check and apply dependency updates, update the Micronaut parent and version properties, and validate with tests.
Upgrade to Java 21 with Micronaut 4.2, and learn to update Gradle to 8.4+, set source and target compatibility to 21, and recompile the app.
Discover how Micronaut employs compile-time dependency injection to reduce startup time and memory usage, configure applications for multiple environments, and implement effective logging for debugging.
Explore dependency injection in Micronaut: use compile-time annotation processing with Jakarta Inject to create loosely coupled components, compare field-based and constructor-based dependency injection, and select implementations with primary.
Inject the HelloWorld service into the Hello World controller using field based injection and Jakarta Inject singleton annotation, then verify tests reflect the service output.
Switch from field-based to constructor-based dependency injection in a Hello world controller, ensuring final fields and automatic constructor injection to prevent nulls and simplify testing.
Create a Java interface and multiple implementations, then use dependency injection to swap behavior at runtime, with a primary implementation guiding which one is injected.
Access the Micronaut application context to retrieve injected beans with context.getBean and log results using a logger. Explore context features like register, singleton, and refresh and the dependency injection lifecycle.
Explore how the Micronaut framework supports Logback and Log4j2 out of the box. Configure dependencies, logback.xml or log4j2.xml, and refine root and package level logging for clear, targeted output.
Configure logging in Micronaut tests by adding a logger and emitting a trace message to the console using a test-specific logback-test.xml for output.
Learn to build RESTful microservices with Micronaut, using Netty-based non-blocking HTTP, asynchronous and synchronous code, and JSON bindings for endpoints like listing, retrieving, and creating, updating, or deleting products.
Create a new Micronaut web project via the launch site using Java 21 and Gradle Kotlin (or Groovy, or Maven), then run to start a server on localhost:8080.
Develop a Micronaut rest API that serves a /products get endpoint, backed by an in-memory store and data faker for test data.
Test the rest endpoint with multiple http clients and annotate the product class with the serdeable annotation for proper json output.
Learn to test a Micronaut rest api by unit testing the products controller with Micronaut test and the Micronaut http client, validating a get /products returns ten items.
Learn to fetch a product by id with a path variable in a Micronaut REST API, using curly braces and a mapped id parameter.
Use query parameters for filtering and pagination in a Micronaut rest API, with optional max and offset defaults implemented in a /filter endpoint and processed via a Java stream.
Develop a Micronaut test to verify query parameters by automating requests with max and offset, asserting five products for max and two from offset six using a JSON node.
Learn how to use http routing annotations in Micronaut to create rest endpoints by mapping http methods to corresponding annotations, and anticipate post, put, delete, and patch usage.
Create a new admin post endpoint at /admin/products in a Micronaut app, accepting a json body with id, name, and type, and store it in an in-memory map.
Set a post handler to return 201 created using an add status annotation, and enforce unique IDs by throwing a 409 conflict when a product ID already exists.
Test and validate a Micronaut http post endpoint for admin products using JUnit, verifying successful creation with an in-memory store and handling conflicts on duplicate posts.
Learn how to implement a put endpoint in Micronaut to update or create a product by id, using name and type in the request body, with an in-memory store.
Verify two http put update tests on the admin pod endpoint, ensuring an existing product updates in memory store and a missing product is created with the same id.
Implement a delete endpoint for a product using the http delete method at localhost:8080/admin/product/{id} to remove it from an in memory store, handling non existent ids, with no request body.
Define a http delete endpoint at /admin/products/{id} using micronaut, returning the deleted product from an in-memory store and yielding 404 for missing items, with tests validating success.
Learn how to describe a rest api with OpenAPI. Generate a specification from Micronaut code using the OpenAPI module, and explore it with Swagger UI or open API Explorer.
Configure and expose a Micronaut OpenAPI specification using YAML, openapi module, and explorer, annotate endpoints, and view live API docs for admin and public routes.
Explore Micronaut versions as the course updates from version four, noting package changes and continuity with older content, and access new material for free while enrolled.
Create your first Micronaut application using quickstart and Micronaut launch, selecting the standard app type and netty-server runtime. Run with Maven on Java 11 to run Micronaut on port 8080.
Create your first hello world rest api endpoint with Micronaut by defining a hello world controller, exposing a http get endpoint, and returning a plain text response.
Explore how Micronaut integrates with JUnit to run fast, isolated tests using the Micronaut test annotation, dependency injection, and a blocking http client to verify a hello world endpoint.
Enable annotation processing in your IDE to leverage Micronaut's compile-time code generation, then rebuild the project to work with advanced features. Apply the same preference to new projects.
Learn how Micronaut core enables compile-time dependency injection to reduce startup time and memory usage, configure environments, and implement robust logging in Micronaut applications.
Explore dependency injection in Micronaut, an inversion of control approach using compile-time annotation processing to enable fast startup, low memory usage, and easy testing through interface-based replacement.
Learn how to implement dependency injection in Micronaut by injecting a singleton hello world service into a hello world controller, using field-based and constructor-based approaches, with unit tests validating setup.
Learn how dependency injection uses interfaces to swap implementations at compile time, with Micronaut resolving the correct service and @Primary to select among multiple implementations.
Configure logging for Micronaut applications and tests using logback, adjust root and package-specific levels, and explore logging in hello world controller tests and CI/CD pipelines.
Configure the http server port in Micronaut via application.yaml, using environment placeholders and fallbacks. Override with environment variables or predefined Micronaut variables to run on the desired port.
Learn to inject immutable configuration with Micronaut by defining a configuration properties class for multi-translation hello world, exposing a json endpoint and validating inputs with bean validation.
Explore Micronaut cloud-native microservices with Java, featuring HTTP server and client options, reactive and non-blocking processing, and API documentation for a stock broker demo.
Create a stock broker Micronaut web project using cradle and Java 17, then add dependencies, run the app, and verify the rest API starts successfully.
Create an in-memory symbol store and expose a get /symbols endpoint with Micronaut, returning symbol records as JSON.
Set up a Micronaut test for the /symbols get endpoint, inject the REST client, and verify a 200 status with ten symbols from an in-memory store.
Learn to implement a get symbol by value endpoint in Micronaut using a path variable, returning a single symbol as JSON and handling 404 errors.
Explore using query parameters to filter and paginate data in a Micronaut microservice, with mix and offset options, a risk API endpoint, and unit tests.
Learn to test a Micronaut rest endpoint's query parameters with JUnit, verifying max and offset behavior via HDP client requests, and asserting response payloads.
Learn how to implement a Micronaut put REST endpoint to update an account watchlist, accepting a request body and persisting changes in memory, with tests.
Implement a delete endpoint for account watch list in a Micronaut Java microservice, removing items from the in-memory store and returning 204 no content, with testing and a unit test.
Configure http responses in micronaut using status annotations to switch codes like 200, 204, and 201, and return custom http response interface objects for delete operations with granular error handling.
Implement custom error handling in the wallet controller and add two new rest api endpoints for deposit fiat money and withdraw fiat money, backed by an in-memory account store.
Implement a custom http error response for the deposit endpoint by validating fiat currencies, returning 400 with a descriptive body for unsupported currencies and 200 for valid ones.
Finalize the deposit endpoint in a Micronaut cloud-native microservice, implementing a common rest api response interface and persisting wallet deposits in the in-memory account store.
Implement a custom exception handler to deliver consistent error responses across endpoints, using a fiat currency not supported exception and a dedicated http response to improve API robustness.
Learn to implement a custom error response processor in Micronaut for cloud native microservices to standardize API error outputs into a consistent application/json format.
Finalize the withdrawal endpoint by returning a wallet type, reuse the deposit logic, and validate with manual tests using the in-memory account store for cloud native microservices with Java.
Welcome to the Micronaut Version 2 Sections!
If you have watched the previous Micronaut Version 3 Lectures. Make sure to skip ahead on what you have seen already, to not run into repetitions.
For example the Micronaut 2 quickstart section can be skipped if you have seen the previous one already.
I am working towards making all sections consistent to only use Version 3 and I am releasing Section by Section. Until everything is updated, I hope you still gain a lot of knowledge from the other sections.
Thank you for your understanding and happy learning!
Boot your first Micronaut application with the Micronaut Launch, using Micronaut version 2 and Java 11, configure Netty, and create a hello world rest endpoint tested with JUnit.
Developers learn to test Micronaut apps using JUnit five, MicronautTest, and a reactive RxHttpClient. The example tests the /hello endpoint, asserts Hello World, and demonstrates iterative debugging.
Configure IntelliJ preferences to enable annotation processing checkbox for the current and new projects, allowing Micronaut to validate, generate, and modify code at compile time.
Explore Micronaut, a modern JVM-based full stack framework for building modular, easily testable microservices and serverless applications, with a focus on the core component to prepare for the modules.
Explore Micronaut's dependency injection, a compile-time inversion of control that delivers fast startup and low memory footprint, with constructor-based injection as the recommended approach and application context access via getBean.
Explore Micronaut's configuration system, using application.yaml and other formats to override defaults like server.port and hello.controller.path, and inject values with @Value and @Property, including immutable configuration.
Inject an immutable greeting config in Micronaut by defining a GreetingConfig with validation. Expose /de and /en endpoints that return German and English greetings from application.yml.
Learn how to implement logging in a Micronaut app by replacing prints with a SLF4J logger, configuring Logback, and using StartupEvent with @EventListener for startup messages.
Integrate project Lombok by adding the lombok dependency to pom.xml or build.gradle and configuring annotation processing before micronaut-inject-java. Lombok reduces boilerplate by generating getters, setters, constructors, and builders.
Explore Micronaut web features, including Netty servers, json binding, http/2, web sockets, declarative http clients with retry and circuit breaker, building a stockbroker api with open api and Swagger ui.
Create a new Micronaut application for the stockbroker project using the micronaut.io/launch wizard, select version 2.5, Maven, and features Nettie and Lombok, then download a zip and open in IntelliJ.
Build a market rest api with Micronaut by creating a market controller and in-memory store, exposing get /markets to return symbol objects; test with Micronaut.
Learn to build a Micronaut rest api with path variables by creating quotes controller, injecting an in-memory store, and returning a quote model with symbol, bid, last price, and volume.
Learn to return proper http response codes and custom error messages, including 404 not found for an unsupported symbol on the quotes endpoint, using the http client and optional handling.
This lecture covers http routing for put and delete in micronaut, building a watch list controller to retrieve, save, update, and delete per-account watch lists using an in-memory store.
Explore Micronaut's non-blocking, event-loop driven HTTP processing with Netty, learn to offload blocking operations to an IO thread pool, and implement reactive endpoints using Single, Observable, and Flowable.
Learn how micronaut generates an openapi yaml at compile time using swagger annotations, exposing documentation via swagger ui, rapidoc, and redoc, with practical steps from setup to testing endpoints.
Configure Jackson json processing in Micronaut by adjusting application.yaml settings, including property naming strategies, date formats, and decimal handling, demonstrated through a hello world json endpoint and a greeting POJO.
Leverage json web token authentication to secure endpoints with bearer tokens, issue tokens on login, and validate requests by verifying signatures.
Demonstrate authenticating microservices with json web tokens using postman: obtain a jwt via login and supply it in the authorization header as a bearer token to access protected endpoints.
Create a custom Micronaut rest client to simplify testing the watchlist reactive controller by automating login to obtain a Json web token and calling protected endpoints.
Learn to implement a JDBC authentication provider in Micronaut that validates users against an H2 in-memory database, issues JWT bearer tokens, and secures endpoints with Micronaut security.
Enhance a custom Json web token with roles and attributes in Micronaut app, issue a bearer token via login, and access secured endpoints by extracting user details from the principal.
Explore how Micronaut data uses ahead-of-time compilation to pre-compute queries, delivering a fast, reflection-free, typesafe data layer with JPA and Jdbc backends across multiple databases.
Set up a PostgreSQL database for Micronaut by running Postgres in Docker with docker run or docker compose, and verify connectivity via IntelliJ or the admin interface at localhost:8081.
Configure flyway with Micronaut and PostgreSQL, set up data source in application.yaml, write versioned migrations, and create symbols and quotes tables with constraints, validating on startup.
Explore how Micronaut Data JPA with Hibernate maps symbol entities to a PostgreSQL database, configure data sources, and expose a symbols repository REST API that returns all symbols.
Create a quotes repository and quote entity with a many-to-one symbol relationship in Micronaut Data JPA, and implement a query to fetch quotes by symbol via /quotes/gpa, including test data.
Explore Micronaut data functionality and preview upcoming sections on data transfer objects, ordering, filtering, and pagination for cloud native microservices with Java.
Learn to implement ordering in Micronaut Data JPA by creating repository methods that order quotes by volume in descending and ascending order, exposing REST endpoints to fetch ordered data.
Explore how to decouple rest api responses from the database by creating a quote DTO with id and volume, annotated with Introspected, and update repository and controller to return DTOs.
Explore Micronaut data filtering by volume greater than a threshold, using a big decimal volume, return quote DTOs, and combine filters with ordering by volume ascending in a REST endpoint.
Enable Micronaut data pagination to return paged quote dto results as a list or slice. Define page and volume parameters with defaults, and use pageable or slice objects in endpoints.
Create a new Micronaut JDBC project in Maven with Netty, Hikari pool, and MySQL. Add Liquibase for migrations and Testcontainers for integration tests, then verify with a Docker-based setup.
Launch a dockerized MySQL instance for Micronaut microservices using Docker run or Docker compose, then connect via IntelliJ or the admin tool and test with root and secret.
Learn how to perform schema migrations with Liquibase in a Micronaut application, comparing SQL, JSON and XML changelogs, enabling rollback, and creating versioned change sets that affect the database.
Learn how to implement a Micronaut data jdbc repository for a transactions table, with liquibase migrations, entity mapping, and automatic CRUD operations (save and find all).
--- ! Course REVAMP: Micronaut Version 5 ---
Right now, this course is outdated and does NOT teach the lastest version of Micronaut.
Please do not purchase the course if you want to rely on the latest version. It is better to wait until I did a revamp of the course. I am sorry for the inconvenience.
A lot of the core concepts stay similar to what I teach, but over time some parts changed.
---
Most of the web applications operate in the cloud. Popular frameworks adapted and tried to make it easy. Micronaut was built to be cloud-native and offers:
Launcher to get easily started
Improved startup times & Minimal memory footprint
No Reflection Usage -> GraalVM support
Reactive non-blocking Http Server
Fast and easy testing
Messaging Integrations
Database Access made easy with Micronaut Data
Micronaut Integrations with MongoDB, Redis, ElasticSearch ...
Micronaut is a modern, JVM-based, full-stack framework for building modular, easily testable microservice and serverless applications.
You will be surprise how fast cloud-native applications can be built with Micronaut. The course starts with the basics and moves on to more and more details from section to section.
Upcoming lectures:
More content on using GraalVM
The course covers currently:
Dependency Injection
Application Configuration
Lombok Integration
Creating REST APIs & using Open API / Swagger
Custom REST API Clients
JWT Auth, JDBC Auth
Micronaut Data Access using PostgreSQL & MySQL
Messaging with Apache Kafka
Using Web Sockets
Building GraalVM native Images
How to use Integrations like Redis, MongoDB, ElasticSearch
and a lot more to come!
If you want to see specific content please drop me a message to prioritise it. My goal is to make the course a place where you have all you need to know to become a Micronaut Expert!
About the instructor:
Daniel is a senior software engineer and developed multiple web applications serving millions of users. He started as full stack developer and was able to gain experience for frontend and backend development.
He found his passion in developing highly scalable applications. Currently he works as a senior software engineer on a fin-tech platform that is used by more than seven million users (2025). He advanced into a role as Technical Lead & Principal Engineer. Now he offers his knowledge to his colleagues. The fin-tech platform utilises Technologies such as Apache Kafka, Java (Spring & Micronaut), PostgreSQL and AWS and consists of many Microservices.