在使用Java配置SpringSecurity的时候启动服务器出错说找不到名字是mvcPathMatcher的bean

乖乖的我的挚爱 发布于 2018/09/01 17:53
阅读 767
收藏 1

包结构

SpringMVC的类

SpringSecurity的类

启动服务器的错误信息

每次启动错误都不一样,好奇怪,我刚刚接触这个不懂

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'handlerExceptionResolver' defined in class org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.HandlerExceptionResolver]: Factory method 'handlerExceptionResolver' threw exception; nested exception is java.lang.AbstractMethodError

 

 

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerAdapter' defined in class org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Factory method 'requestMappingHandlerAdapter' threw exception; nested exception is java.lang.AbstractMethodError

 

 

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'beanNameHandlerMapping' defined in class org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping]: Factory method 'beanNameHandlerMapping' threw exception; nested exception is java.lang.AbstractMethodError
    

 

和org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mvcUriComponentsContributor' defined in class org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.method.support.CompositeUriComponentsContributor]: Factory method 'mvcUriComponentsContributor' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerAdapter' defined in class org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Factory method 'requestMappingHandlerAdapter' threw exception; nested exception is java.lang.AbstractMethodError
 

 

反正每次都不一样,好奇怪

加载中
0
乖乖的我的挚爱

哎!应为你的包不对啊你用的是SpringSecurit是5.0以上的Spring实战第四版是4.0以上的

返回顶部
顶部