本帖最后由 eric06s 于 2011-11-07 01:49:13 编辑

解决方案 »

  1.   

    异常信息: bean 的唯一ID没有被找到..查找下看没有定义Bean
      

  2.   

    (1)Maybe, error is here: ApplicationContext ctx = new FileSystemXmlApplicationContext("test.xml"); xxImpl monitor = ctx.getBean(xxImpl.class); ApplicationContext ctx = new ClassPathXmlApplicationContext("file:spring-configuration/unit-testing/application-config.xml"); Main main = ctx.getBean(Main.class);(2) Changed xxImpl, use @Autowired(3) don't foget add CGLib(4) it works.
      

  3.   

    这是我在stack overflow 上面自己解答的。还是找到了问题http://stackoverflow.com/questions/8028849/spring-aop-batch-retry-exception-expected-single-bean-but-found-0/8032665#8032665