使用junit测试报错求解决
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:308)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'activateTablesService': Injection of autowired dependencies failed;
nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private
com.supporter.prj.bm.budgeteering.service.BudgeteeringTableService com.supporter.prj.bm.budgeteering.service.ActivateTablesService.budgeteeringTableService; nested
exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'budgeteeringTableService': Injection of autowired dependencies
failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private
com.supporter.prj.bm.budgeteering.service.BudgeteeringTableRecService com.supporter.prj.bm.budgeteering.service.BudgeteeringTableService.budgeteeringTableRecService;
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'budgeteeringTableRecService': Injection of autowired
dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private
com.supporter.prj.bm.budgeteering.service.BudgeteeringTableService com.supporter.prj.bm.budgeteering.service.BudgeteeringTableRecService.budgeteeringTableService;
nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private
com.supporter.prj.bm.budgeteering.service.BudgeteeringTableService com.supporter.prj.bm.budgeteering.service.ActivateTablesService.budgeteeringTableService; nested
exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'budgeteeringTableService': Injection of autowired dependencies
failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private
com.supporter.prj.bm.budgeteering.service.BudgeteeringTableRecService com.supporter.prj.bm.budgeteering.service.BudgeteeringTableService.budgeteeringTableRecService;
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'budgeteeringTableRecService': Injection of autowired
dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private
com.supporter.prj.bm.budgeteering.service.BudgeteeringTableService com.supporter.prj.bm.budgeteering.service.BudgeteeringTableRecService.budgeteeringTableService;
nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject
(AutowiredAnnotationBeanPostProcessor.java:502)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:282)
... 38 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'budgeteeringTableService': Injection of autowired dependencies
failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private
com.supporter.prj.bm.budgeteering.service.BudgeteeringTableRecService com.supporter.prj.bm.budgeteering.service.BudgeteeringTableService.budgeteeringTableRecService;