org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘myPasssWordLoginFilter’: Unsatisfied dependency expressed through field ‘redisUtil’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.sf.XWFS.utils.redis.RedisUtil’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1268)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4753)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5215)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1736)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:482)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:431)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
at javax.management.remote.rmi.RMIConnectionImpl.access
300
(
R
M
I
C
o
n
n
e
c
t
i
o
n
I
m
p
l
.
j
a
v
a
:
76
)
a
t
j
a
v
a
x
.
m
a
n
a
g
e
m
e
n
t
.
r
e
m
o
t
e
.
r
m
i
.
R
M
I
C
o
n
n
e
c
t
i
o
n
I
m
p
l
300(RMIConnectionImpl.java:76) at javax.management.remote.rmi.RMIConnectionImpl
300(RMIConnectionImpl.java:76)atjavax.management.remote.rmi.RMIConnectionImplPrivilegedOperation.run(RMIConnectionImpl.java:1309)
at java.security.AccessController.doPrivileged(Native Method)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport
1.
r
u
n
(
T
r
a
n
s
p
o
r
t
.
j
a
v
a
:
197
)
a
t
j
a
v
a
.
s
e
c
u
r
i
t
y
.
A
c
c
e
s
s
C
o
n
t
r
o
l
l
e
r
.
d
o
P
r
i
v
i
l
e
g
e
d
(
N
a
t
i
v
e
M
e
t
h
o
d
)
a
t
s
u
n
.
r
m
i
.
t
r
a
n
s
p
o
r
t
.
T
r
a
n
s
p
o
r
t
.
s
e
r
v
i
c
e
C
a
l
l
(
T
r
a
n
s
p
o
r
t
.
j
a
v
a
:
196
)
a
t
s
u
n
.
r
m
i
.
t
r
a
n
s
p
o
r
t
.
t
c
p
.
T
C
P
T
r
a
n
s
p
o
r
t
.
h
a
n
d
l
e
M
e
s
s
a
g
e
s
(
T
C
P
T
r
a
n
s
p
o
r
t
.
j
a
v
a
:
568
)
a
t
s
u
n
.
r
m
i
.
t
r
a
n
s
p
o
r
t
.
t
c
p
.
T
C
P
T
r
a
n
s
p
o
r
t
1.run(Transport.java:197) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:196) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) at sun.rmi.transport.tcp.TCPTransport
1.run(Transport.java:197)atjava.security.AccessController.doPrivileged(NativeMethod)atsun.rmi.transport.Transport.serviceCall(Transport.java:196)atsun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)atsun.rmi.transport.tcp.TCPTransportConnectionHandler.run0(TCPTransport.java:826)
14-Apr-2021 13:38:05.827 严重 [RMI TCP Connection(5)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
at sun.rmi.transport.tcp.TCPTransport
C
o
n
n
e
c
t
i
o
n
H
a
n
d
l
e
r
.
l
a
m
b
d
a
ConnectionHandler.lambda
ConnectionHandler.lambdarun
0
(
T
C
P
T
r
a
n
s
p
o
r
t
.
j
a
v
a
:
683
)
14
−
A
p
r
−
202113
:
38
:
05.828
严
重
[
R
M
I
T
C
P
C
o
n
n
e
c
t
i
o
n
(
5
)
−
127.0.0.1
]
o
r
g
.
a
p
a
c
h
e
.
c
a
t
a
l
i
n
a
.
c
o
r
e
.
S
t
a
n
d
a
r
d
C
o
n
t
e
x
t
.
s
t
a
r
t
I
n
t
e
r
n
a
l
C
o
n
t
e
x
t
[
]
s
t
a
r
t
u
p
f
a
i
l
e
d
d
u
e
t
o
p
r
e
v
i
o
u
s
e
r
r
o
r
s
a
t
j
a
v
a
.
s
e
c
u
r
i
t
y
.
A
c
c
e
s
s
C
o
n
t
r
o
l
l
e
r
.
d
o
P
r
i
v
i
l
e
g
e
d
(
N
a
t
i
v
e
M
e
t
h
o
d
)
a
t
s
u
n
.
r
m
i
.
t
r
a
n
s
p
o
r
t
.
t
c
p
.
T
C
P
T
r
a
n
s
p
o
r
t
0(TCPTransport.java:683) 14-Apr-2021 13:38:05.828 严重 [RMI TCP Connection(5)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.tcp.TCPTransport
0(TCPTransport.java:683)14−Apr−202113:38:05.828严重[RMITCPConnection(5)−127.0.0.1]org.apache.catalina.core.StandardContext.startInternalContext[]startupfailedduetopreviouserrorsatjava.security.AccessController.doPrivileged(NativeMethod)atsun.rmi.transport.tcp.TCPTransportConnectionHandler.run(TCPTransport.java:682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor
W
o
r
k
e
r
.
r
u
n
(
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
.
j
a
v
a
:
617
)
a
t
j
a
v
a
.
l
a
n
g
.
T
h
r
e
a
d
.
r
u
n
(
T
h
r
e
a
d
.
j
a
v
a
:
748
)
C
a
u
s
e
d
b
y
:
o
r
g
.
s
p
r
i
n
g
f
r
a
m
e
w
o
r
k
.
b
e
a
n
s
.
f
a
c
t
o
r
y
.
N
o
S
u
c
h
B
e
a
n
D
e
f
i
n
i
t
i
o
n
E
x
c
e
p
t
i
o
n
:
N
o
q
u
a
l
i
f
y
i
n
g
b
e
a
n
o
f
t
y
p
e
′
c
o
m
.
s
f
.
X
W
F
S
.
u
t
i
l
s
.
r
e
d
i
s
.
R
e
d
i
s
U
t
i
l
′
a
v
a
i
l
a
b
l
e
:
e
x
p
e
c
t
e
d
a
t
l
e
a
s
t
1
b
e
a
n
w
h
i
c
h
q
u
a
l
i
f
i
e
s
a
s
a
u
t
o
w
i
r
e
c
a
n
d
i
d
a
t
e
.
D
e
p
e
n
d
e
n
c
y
a
n
n
o
t
a
t
i
o
n
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
a
t
i
o
n
B
e
a
n
P
o
s
t
P
r
o
c
e
s
s
o
r
Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748) Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.sf.XWFS.utils.redis.RedisUtil' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1493) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1104) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor
Worker.run(ThreadPoolExecutor.java:617)atjava.lang.Thread.run(Thread.java:748)Causedby:org.springframework.beans.factory.NoSuchBeanDefinitionException:Noqualifyingbeanoftype′com.sf.XWFS.utils.redis.RedisUtil′available:expectedatleast1beanwhichqualifiesasautowirecandidate.Dependencyannotations:@org.springframework.beans.factory.annotation.Autowired(required=true)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1493)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1104)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessorAutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)
… 62 common frames omitted
2021-04-14 13:38:05| WARN | net.sf.ehcache.config.CacheConfiguration| Cache ‘startUpCache’ is set to eternal but also has TTI/TTL set. To avoid this warning, clean up the config removing conflicting values of eternal, TTI and TTL. Effective configuration for Cache ‘startUpCache’ will be eternal=‘true’, timeToIdleSeconds=‘0’, timeToLiveSeconds=‘0’.
[2021-04-14 01:38:06,080] Artifact ADMT-web:war exploded: Error during artifact deployment. See server log for details.
解决方案:
myPasssWordLoginFilter 过滤器需要注入RedisUtil到spring才能使用
spring-context.xml
<!-- 重构登陆过滤器配置,过滤器内部依赖的bean,需要单独注入到Sping-->
<bean id="myPasssWordLoginFilter" class="com.sf.XWFS.filter.MyPasssWordLoginFilter"></bean>
<bean id="redisUtil" class="com.sf.XWFS.utils.redis.RedisUtil"></bean>