From the course: Learning Quarkus
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Dependency Injection in Quarkus
- [Instructor] No discussion of Quarkus would be complete without a discussion of the dependency injection strategy for the framework as a whole. Dependency injection is a different way of dealing with the constructs of control. Instead of you managing the state of the classes that are part of your application, you allow the container to manage them. Let's take a look at how this works. First and foremost, we start with our container. Now this is any web application, any batch job, any container whatsoever, as long as Quarkus is controlling it. Now we're going to imagine that our container manages several classes or beans, as they become defined, once they are part of Quarkus. Now, one of our classes needs a dependency. With traditional dependency management, you would create the object you need in your class, but instead we will define it so the container can create it. Then, you allow the container to inject the class…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Welcome to Quarkus5m 31s
-
(Locked)
Introducing the docs4m 40s
-
(Locked)
Starting a project6m 44s
-
(Locked)
Dependency Injection in Quarkus6m 48s
-
(Locked)
Command mode Quarkus5m 13s
-
(Locked)
Configuration properties in Quarkus5m
-
(Locked)
Logging in Quarkus4m 39s
-
(Locked)
Challenge: Fizz Buzz1m 36s
-
(Locked)
Solution: Fizz Buzz4m 6s
-
-
-
-