码上敲享录 > springcloud开发经验分享 > 解决Failed to introspect annotated methods on class org.springframework.cloud.netflix.zuul.ZuulConfigu

解决Failed to introspect annotated methods on class org.springframework.cloud.netflix.zuul.ZuulConfigu

上一章章节目录下一章 2018-09-02已有6426人阅读 评论(0)

java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@e34b1b: startup date [Sun Sep 02 14:12:30 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@1e68d87


org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [com.bx.Application]; nested exception is java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.cloud.netflix.zuul.ZuulConfiguration


Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/context/embedded/ServletRegistrationBean


Caused by: java.lang.ClassNotFoundException: org.springframework.boot.context.embedded.ServletRegistrationBean


解决方法:

原因是springboot和springcloud版本不兼容了,我的springboot版本是1.5.6,而springcloud版本是Brixton.SR5,使用@EnableZuulProxy后启动报错如上所示,我的解决方法就是把Brixton.SR5改成Dalston.SR1即可。springboot和springcloud版本兼容参考:http://www.yayihouse.com/yayishuwu/chapter/1557


本文链接:http://www.yayihouse.com/yayishuwu/chapter/1556


1

有建议,请留言!

  • *您的姓名:

  • *所在城市:

  • *您的联系电话:

    *您的QQ:

  • 咨询问题:

  • 提 交