No qualifying bean of type 'concert.PerformanceImp' available

后端 未结 2 1042
盖世英雄少女心
盖世英雄少女心 2021-01-27 07:56

I am still a beginner in Spring Framework so I tried to code a program about \"introduction\" in Spring AOP but I am facing an error while compiling. Please find below the class

2条回答
  •  爱一瞬间的悲伤
    2021-01-27 08:26

    Try:

    Performance pi = context.getBean("performanceImp", Performance.class);
    

    instead of:

    PerformanceImp pi = (PerformanceImp) context.getBean(PerformanceImp.class);
    

提交回复
热议问题