添加 Spring Security taglib 在 tomcat 启动 bean 时会产生错误

发布于 2024-10-16 18:43:35 字数 11544 浏览 3 评论 0原文

我正在使用 Spring MVC (Spring 3.0.0) 开发一个学校项目。

现在一切都正常工作,直到我使用 Spring Security taglib 添加到 pom.xml

<dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>org.springframework.security.taglibs</artifactId>
        <version>${spring.version}</version>
</dependency>

(可能值得注意的是,直到我添加以下 Maven 存储库,它甚至找不到 taglib)。

<repository>
        <id>com.springsource.repository.bundles.external</id>
        <name>EBR External Release Repository</name>
        <url>http://repository.springsource.com/maven/bundles/external</url>
</repository>

我得到的错误如下:

feb 08 2011 19:46:51 ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.access.intercept.FilterSecurityInterceptor#0': Cannot create inner bean '(inner bean)' of type [org.springframework.security.web.access.expression.ExpressionBasedFilterInvocationSecurityMetadataSource] while setting bean property 'securityMetadataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#11': Cannot create inner bean '(inner bean)' of type [org.springframework.security.access.SecurityConfig] while setting constructor argument with key [Root bean: class [org.springframework.security.web.access.intercept.RequestKey]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#12': No matching factory method found: factory method 'createSingleAttributeList'
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:125) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1305) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1067) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:557) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:842) [org.springframework.context-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:416) [org.springframework.context-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261) [org.springframework.web-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192) [org.springframework.web-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [org.springframework.web-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135) [catalina.jar:6.0.29]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630) [catalina.jar:6.0.29]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) [catalina.jar:6.0.29]
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) [catalina.jar:6.0.29]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) [catalina.jar:6.0.29]
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637) [catalina.jar:6.0.29]
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563) [catalina.jar:6.0.29]
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498) [catalina.jar:6.0.29]
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) [catalina.jar:6.0.29]
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) [catalina.jar:6.0.29]
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) [catalina.jar:6.0.29]
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) [catalina.jar:6.0.29]
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) [catalina.jar:6.0.29]
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) [catalina.jar:6.0.29]
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445) [catalina.jar:6.0.29]
at org.apache.catalina.core.StandardService.start(StandardService.java:519) [catalina.jar:6.0.29]
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) [catalina.jar:6.0.29]
at org.apache.catalina.startup.Catalina.start(Catalina.java:581) [catalina.jar:6.0.29]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_23]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_23]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_23]
at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_23]
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) [bootstrap.jar:6.0.29]
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) [bootstrap.jar:6.0.29]
 Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#11': Cannot create inner bean '(inner bean)' of type [org.springframework.security.access.SecurityConfig] while setting constructor argument with key [Root bean: class [org.springframework.security.web.access.intercept.RequestKey]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#12': No matching factory method found: factory method 'createSingleAttributeList'
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:125) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:383) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:161) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:586) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:140) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:984) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:886) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:479) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
... 39 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#12': No matching factory method found: factory method 'createSingleAttributeList'
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:502) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:964) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:868) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:479) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
... 49 common frames omitted

有人知道我做错了什么吗?我为此抓狂。

I am working on a school project using Spring MVC (Spring 3.0.0).

Now everything works as it should, until I add the Spring Security taglib to pom.xml using

<dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>org.springframework.security.taglibs</artifactId>
        <version>${spring.version}</version>
</dependency>

(It may be worth noting that until I add the following maven repo, it can't even find the taglib).

<repository>
        <id>com.springsource.repository.bundles.external</id>
        <name>EBR External Release Repository</name>
        <url>http://repository.springsource.com/maven/bundles/external</url>
</repository>

The error I get is as follows:

feb 08 2011 19:46:51 ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.access.intercept.FilterSecurityInterceptor#0': Cannot create inner bean '(inner bean)' of type [org.springframework.security.web.access.expression.ExpressionBasedFilterInvocationSecurityMetadataSource] while setting bean property 'securityMetadataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#11': Cannot create inner bean '(inner bean)' of type [org.springframework.security.access.SecurityConfig] while setting constructor argument with key [Root bean: class [org.springframework.security.web.access.intercept.RequestKey]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#12': No matching factory method found: factory method 'createSingleAttributeList'
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:125) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1305) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1067) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:557) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:842) [org.springframework.context-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:416) [org.springframework.context-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261) [org.springframework.web-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192) [org.springframework.web-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [org.springframework.web-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135) [catalina.jar:6.0.29]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630) [catalina.jar:6.0.29]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) [catalina.jar:6.0.29]
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) [catalina.jar:6.0.29]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) [catalina.jar:6.0.29]
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637) [catalina.jar:6.0.29]
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563) [catalina.jar:6.0.29]
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498) [catalina.jar:6.0.29]
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) [catalina.jar:6.0.29]
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321) [catalina.jar:6.0.29]
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) [catalina.jar:6.0.29]
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) [catalina.jar:6.0.29]
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785) [catalina.jar:6.0.29]
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) [catalina.jar:6.0.29]
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445) [catalina.jar:6.0.29]
at org.apache.catalina.core.StandardService.start(StandardService.java:519) [catalina.jar:6.0.29]
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) [catalina.jar:6.0.29]
at org.apache.catalina.startup.Catalina.start(Catalina.java:581) [catalina.jar:6.0.29]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_23]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_23]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_23]
at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_23]
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) [bootstrap.jar:6.0.29]
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) [bootstrap.jar:6.0.29]
 Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#11': Cannot create inner bean '(inner bean)' of type [org.springframework.security.access.SecurityConfig] while setting constructor argument with key [Root bean: class [org.springframework.security.web.access.intercept.RequestKey]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#12': No matching factory method found: factory method 'createSingleAttributeList'
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:125) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:383) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:161) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:586) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:140) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:984) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:886) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:479) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
... 39 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#12': No matching factory method found: factory method 'createSingleAttributeList'
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:502) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:964) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:868) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:479) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270) [org.springframework.beans-3.0.0.RELEASE.jar:3.0.0.RELEASE]
... 49 common frames omitted

Does anybody have any idea what I'm doing wrong? I'm tearing my hair out over this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

薄荷港 2024-10-23 18:43:35

你的artifactId看起来不正确,试试这个:-

    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-taglibs</artifactId>
        <version>${spring.version}</version>
    </dependency>

这些都是Spring Security相关的依赖项:-

    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-core</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-config</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-web</artifactId>
        <version>${spring.version}</version>
    </dependency>

仅供参考,你不需要配置该存储库,因为Spring Security存在于默认的Maven存储库中。

Your artifactId doesn't look right, try this:-

    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-taglibs</artifactId>
        <version>${spring.version}</version>
    </dependency>

These are all the Spring Security related dependencies:-

    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-core</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-config</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-web</artifactId>
        <version>${spring.version}</version>
    </dependency>

Just FYI, you don't need that repository configured because Spring Security exists in the default Maven repository.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文