org.springframework.beans.factory.BeanCreationException: Error creating bean with name

如果你不相信努力和时光,那么成果就会是第一个选择辜负你的。不要去否定你自己的过去,也不要用你的过去牵扯你现在的努力和对未来的展望。不是因为拥有希望你才去努力,而是去努力了,你才有可能看到希望的光芒。org.springframework.beans.factory.BeanCreationException: Error creating bean with name,希望对大家有帮助,欢迎收藏,转发!站点地址:www.bmabk.com,来源:原文

‘org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping’:
Instantiation of bean failed; nested exception is
java.lang.NoSuchMethodError:
org.springframework.web.cors.CorsConfiguration.addAllowedOriginPattern(Ljava/lang/String;)V
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1318)
~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE] at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1213)
~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE] at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE] at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE] at
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE] at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE] at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE] at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE] at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)
~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE] at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
~[spring-context-5.2.8.RELEASE.jar:5.2.8.RELEASE] at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
~[spring-context-5.2.8.RELEASE.jar:5.2.8.RELEASE]

注意pom.xml里边导入的包,有些包需要版本相同,还有些包需要最新版本,老版本会出错。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/198012.html

(0)
飞熊的头像飞熊bm

相关推荐

发表回复

登录后才能评论
极客之音——专业性很强的中文编程技术网站,欢迎收藏到浏览器,订阅我们!