
Enable annotations processing in Intellij.
Creating our /hello endpoint, that will return "Hello World!" as a response.
Complete code for this section can be found over Github.
Dependency injection and beans in Micronaut.
Ways of qualifying among multiple possible beans of same interface instance to be injected.
@Named and @Qualifier annotations(as per JSR-330 specs)
Complete source code can be found over Github.
Micronaut - Bean Priority Complete source code can be found over Github.
@Primary annotation prioritizes the bean in case of multiple possible implementations.
@Secondary annotation de-prioritizes the bean.
In this video, we will take a look at further bean concepts like Bean Scopes, Bean Factories, Conditional Beans and Bean Replacements.
Read further in detail from the Micronaut official documentation.
In this video, we will take a look at Bean life cycle methods in Micronaut:
1)@PostContruct
2)@PreDestroy
Micronaut HTTP Server, HTTP Methods, Binding Annotations, HTTP Response.
User Service - HTTP POST, GET
Create User
Fetch Users
User Service - HTTP PUT, DELETE
Update User
Delete User
User Service - Bean Validations
Error handling in Micronaut (at Global level)
Introduction to Micronaut Data.
Database Migrations with Flyway.
Scheduled tasks in Micronaut. @Scheduled annotation.
Generally, we have multiple instances running of our service to handle scale, and we don't want all of our instances to run the scheduled task.
In this video, we will see how to solve the problem of scheduled tasks in distributed environment, that we discussed in last lecture.
In this lecture, we will create a separate service "Preference service" to store user preferences. And in the next lecture, we will see about inter-service communication between our user-service and preference-service using Micronaut's declarative httpclient API.
In this video, we will see Micronaut's declarative httpclient, that enables us to call other external APIs from the micronaut app.
Micronaut is a modern, JVM-based, full-stack Java framework designed for building modular, easily testable JVM apps. It currently supports Java, Kotlin, and Groovy.
It has the following benefits over other available frameworks like Spring boot:
1. Fast startup time - Thanks to Micronaut AOT. It reduces application startup time and deployment size by executing a number of operations during the build. It can precompute bean requirements and perform substitutions at build time, so that only classes that are going to be used in production are included.
2. Reduced memory footprint
3. Minimal use of reflection - It does the dependency injection at compile time, so it doesn't make the use of reflection for dependency injection at run time.
4. Minimal use of proxies
5. No runtime bytecode generation
6. Easy Unit Testing
In this course, you will learn the following topics:
1. Creating a hello world application with Micronaut.
2. Dependency Injection and Bean concepts in Micronaut - Bean qualifiers, Bean priority, Bean lifecycle methods.
3. REST APIs with Micronaut - GET, POST, PUT, DELETE.
4. Micronaut Data - a database access toolkit that uses Ahead of Time (AoT) compilation to pre-compute queries for repository interfaces that are then executed by a thin, lightweight runtime layer.
5. Error handling
6. Flyway integration with micronaut for easy database migrations(production ready).
7. Shedlock integration with Micronaut for running scheduled tasks in distributed environment.
8. Interservice communication using HTTPClient.