项目

一般

简介

'pattern' attribute to define the request patterns to which they apply

由 徐 田汉 在 大约 3 年 之前添加

解决方案:用户发的解决方案文档(请看附件),记录下,供参考

问题描述:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.filterChainProxy': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: The FilterChainProxy contains two filter chains using the matcher Ant [pattern='/integrated-search!queryinterface**']. If you are using multiple <http> namespace elements, you must use a 'pattern' attribute to define the request patterns to which they apply.
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:633)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
    at com.apusic.web.container.EventBroadcaster.fireContextInitializedEvent(EventBroadcaster.java:213)
    at com.apusic.web.container.WebContainer.finishContextInitialization(WebContainer.java:1285)
    at com.apusic.web.container.WebContainer.start(WebContainer.java:304)
    at com.apusic.web.http.VirtualHost.addContext(VirtualHost.java:154)
    at com.apusic.web.http.HttpServer.loadWebModule(HttpServer.java:224)
    at com.apusic.web.WebService.loadWebModule(WebService.java:591)
    at com.apusic.deploy.runtime.WebModule.load(WebModule.java:1963)
    at com.apusic.deploy.runtime.J2EEApplication.loadModules(J2EEApplication.java:1300)
    at com.apusic.deploy.runtime.J2EEApplication.startApplication(J2EEApplication.java:1206)
    at com.apusic.deploy.runtime.J2EEApplication.startService(J2EEApplication.java:1062)
    at com.apusic.service.Service.start(Service.java:205)
    at com.apusic.deploy.runtime.J2EEDeployer.startUserApplications(J2EEDeployer.java:175)
    at com.apusic.deploy.runtime.J2EEDeployer.startService(J2EEDeployer.java:142)
    at com.apusic.service.Service.start(Service.java:205)
    at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.apusic.jmx.MBeanDescriptor.invoke(MBeanDescriptor.java:551)
    at com.apusic.jmx.DynamicMBeanSupport.invoke(DynamicMBeanSupport.java:62)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    at com.apusic.server.J2EEServer.start(J2EEServer.java:653)
    at com.apusic.server.J2EEServer.startup(J2EEServer.java:374)
    at com.apusic.server.Main.main(Main.java:35)
Caused by: java.lang.IllegalArgumentException: The FilterChainProxy contains two filter chains using the matcher Ant [pattern='/integrated-search!queryinterface**']. If you are using multiple <http> namespace elements, you must use a 'pattern' attribute to define the request patterns to which they apply.
    at org.springframework.security.config.http.DefaultFilterChainValidator.checkForDuplicateMatchers(DefaultFilterChainValidator.java:63)
    at org.springframework.security.config.http.DefaultFilterChainValidator.validate(DefaultFilterChainValidator.java:40)
    at org.springframework.security.web.FilterChainProxy.afterPropertiesSet(FilterChainProxy.java:151)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509)
    ... 36 more
2021-12-29 15:46:41 错误 [apusic.web.lhszdag./lhszdag-HTTPHandler-3-80] 执行Servlet时发生错误。
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.filterChainProxy': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: The FilterChainProxy contains two filter chains using the matcher Ant [pattern='/integrated-search!queryinterface**']. If you are using multiple <http> namespace elements, you must use a 'pattern' attribute to define the request patterns to which they apply.
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:633)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
    at com.apusic.web.container.EventBroadcaster.fireContextInitializedEvent(EventBroadcaster.java:213)
    at com.apusic.web.container.WebContainer.finishContextInitialization(WebContainer.java:1285)
    at com.apusic.web.container.WebContainer.start(WebContainer.java:304)
    at com.apusic.web.http.VirtualHost.addContext(VirtualHost.java:154)
    at com.apusic.web.http.HttpServer.loadWebModule(HttpServer.java:224)
    at com.apusic.web.WebService.loadWebModule(WebService.java:591)
    at com.apusic.deploy.runtime.WebModule.load(WebModule.java:1963)
    at com.apusic.deploy.runtime.J2EEApplication.loadModules(J2EEApplication.java:1300)
    at com.apusic.deploy.runtime.J2EEApplication.startApplication(J2EEApplication.java:1206)
    at com.apusic.deploy.runtime.J2EEApplication.startService(J2EEApplication.java:1062)
    at com.apusic.service.Service.start(Service.java:205)
    at com.apusic.deploy.runtime.J2EEDeployer.startUserApplications(J2EEDeployer.java:175)
    at com.apusic.deploy.runtime.J2EEDeployer.startService(J2EEDeployer.java:142)
    at com.apusic.service.Service.start(Service.java:205)
    at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.apusic.jmx.MBeanDescriptor.invoke(MBeanDescriptor.java:551)
    at com.apusic.jmx.DynamicMBeanSupport.invoke(DynamicMBeanSupport.java:62)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    at com.apusic.server.J2EEServer.start(J2EEServer.java:653)
    at com.apusic.server.J2EEServer.startup(J2EEServer.java:374)
    at com.apusic.server.Main.main(Main.java:35)