阅读了《架构探险》这本书之后简单梳理一下自己实现IOC的基本流程

首先要自己定义一个注解

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 依赖注入注解
 *
 * @since 1.0.0
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Inject {
}

这个注解标记在类中的哪个属性

相关文章:

  • 2021-12-21
  • 2021-12-23
  • 2020-10-31
  • 2021-06-19
  • 2021-10-05
  • 2021-10-22
  • 2021-09-03
  • 2021-12-11
猜你喜欢
  • 2022-02-21
  • 2021-06-15
  • 2021-06-02
  • 2022-12-23
  • 2022-12-23
  • 2021-07-14
  • 2019-07-18
相关资源
相似解决方案