Bean后处理器

新建maven项目并添加spring依赖,目录结构如下

spring 后处理器

Axe

public interface Axe {
    public String chop();
}

Person

public interface Person {
    public void useAxe();
}

SteelAxe

public class SteelAxe
        implements Axe
{
    public SteelAxe()
    {
        System.out.println("Spring实例化依赖bean:SteelAxe实例...");
    }
    public String chop()
    {
        return "钢斧砍柴真快";
    }
}
View Code

相关文章:

  • 2022-12-23
  • 2021-08-20
  • 2022-01-19
  • 2021-11-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-29
  • 2022-01-26
  • 2022-01-28
  • 2021-07-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案