在使用ssm框架中经常遇到创建bean错误的情况,下面会根据多种情况分析可能的原因和解决方案:
org.springframework.beans.factory.BeanCreationException:Error creating bean with name 'categoryController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private cn.e3mall.content.service.ContentCategoryService cn.e3mall.controller.CategoryController.contentCategoryService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contentServiceImpl': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service cn.e3mall.content.service.ContentCategoryService. No provider available for the service cn.e3mall.content.service.ContentCategoryService from the url zookeeper://192.168.25.128:2181/com.alibaba.dubbo.registry.RegistryService?application=e3-manager-web&dubbo=