21-Aug-2022 22:20:33.859 璀﹀憡 [RMI TCP Connection(3)-127.0.0.1] org.springframework.context.support.AbstractApplicationContext.refresh Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userController': Unsatisfied dependency expressed through field 'userService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Invocation of init method failed; nested exception is java.lang.ClassCastException: class org.apache.dubbo.config.RegistryConfig cannot be cast to class [Ljava.lang.String; (org.apache.dubbo.config.RegistryConfig is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @5734a006; [Ljava.lang.String; is in module java.base of loader 'bootstrap')
21-Aug-2022 22:20:33.867 涓ラ噸 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.FrameworkServlet.initServletBean Context initialization failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userController': Unsatisfied dependency expressed through field 'userService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Invocation of init method failed; nested exception is java.lang.ClassCastException: class org.apache.dubbo.config.RegistryConfig cannot be cast to class [Ljava.lang.String; (org.apache.dubbo.config.RegistryConfig is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @5734a006; [Ljava.lang.String; is in module java.base of loader 'bootstrap')
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:659)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:639)
dubbo与springMVC直连报错
最新推荐文章于 2023-02-15 14:03:39 发布
在尝试将dubbo服务与SpringMVC应用程序集成时遇到了初始化错误。具体表现为:在创建'userService' bean时,初始化方法失败,导致了ClassCastException,无法将org.apache.dubbo.config.RegistryConfig转换为[String]。此问题可能源于配置不正确或依赖注入的异常。
摘要由CSDN通过智能技术生成