免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Jakarta Contexts and Dependency Injection overview
- [Instructor] Context and dependency injection, CDI, is a framework that makes it easier to integrate Jakarta EE components of different types. In other words, CDI can be thought of as the glue that holds the different layers or tiers of a Jakarta EE application together. CDI enables Java object dependencies to be automatically injected, or in other words, have their dependencies provided to them automatically instead of having to create them or receive them as parameters. It also helps to manage the lifecycle of those dependent objects, making it possible to write powerful, loosely coupled code. When talking about CDI, you encounter the word bean. What really is a bean? A bean can be any injectable object which can be provided as a dependency to another bean. A bean in CDI is any Java class that has a no-arguments constructor or at least one other injectable constructor. So any Java class that meets this requirement becomes qualified to be a CDI bean and to be managed by Jakarta…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。