Dependency Injection Framework From Scratch (Spring Boot Replica) (Java) Part One - Scanning Classes

Опубликовано: 14 Октябрь 2024
на канале: Cyecize
3,383
95

Create your own custom Dependency Container (IoC Container) Framework from the ground up without any third party libraries, just java.

The custom container will be able to replicate the functionality of Spring Boot's IoC Container - "Spring Context".
For example you we will have our own @Service and @Bean annotations and we will automatically resolve all dependencies.

Link to Part Two:
   • Create Your Own IoC / Dependency Cont...  

Link to Github:
https://github.com/Cyecize/Magic-IoC-...

In order for the video to be more understandable, I have split the development process into 5 main sub tasks:
Create New Project
Locate Classes
Map Classes
Instantiate Services And Beans
Implement Dependency Container Service

In this Part we are covering the first 2 sub task - Creating the project and scanning all classes in the application.

Scanning the classes is little tricky since there are 2 ways of running a java app - from .jar file and from directory (calling the main class).

So in this video I am showing how to scan classes both from jar file and from a directory.