异常信息:[zxl-sso-server:192.168.1.157:3333:dev] 2020-11-14 18:02:27.897 WARN 6472 [restartedMain][558][refresh] org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘ygerResourceServerConfig’: Unsatisfied dependency expressed through field ‘resourceSecurityFilterManager’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘ygerResourceSecurityFilterManager’: Unsatisfied dependency expressed through field ‘resourceSecurityFilterProviders’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘java.util.List<com.yger.security.core.authorize.filter.ResourceSecurityFilterProvider>’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
[zxl-sso-server:192.168.1.157:3333:dev] 2020-11-14 18:02:27.925 WARN 6472 [restartedMain][173][log] org.apache.catalina.loader.WebappClassLoaderBase The web application [zxl-sso-server] appears to have started a thread named [logback-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
java.util.concurrent.locks.AbstractQueuedSynchronizer
C
o
n
d
i
t
i
o
n
O
b
j
e
c
t
.
a
w
a
i
t
N
a
n
o
s
(
A
b
s
t
r
a
c
t
Q
u
e
u
e
d
S
y
n
c
h
r
o
n
i
z
e
r
.
j
a
v
a
:
2078
)
j
a
v
a
.
u
t
i
l
.
c
o
n
c
u
r
r
e
n
t
.
S
c
h
e
d
u
l
e
d
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) java.util.concurrent.ScheduledThreadPoolExecutor
ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)java.util.concurrent.ScheduledThreadPoolExecutorDelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
java.util.concurrent.ScheduledThreadPoolExecutor
D
e
l
a
y
e
d
W
o
r
k
Q
u
e
u
e
.
t
a
k
e
(
S
c
h
e
d
u
l
e
d
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
.
j
a
v
a
:
809
)
j
a
v
a
.
u
t
i
l
.
c
o
n
c
u
r
r
e
n
t
.
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
.
g
e
t
T
a
s
k
(
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
.
j
a
v
a
:
1074
)
j
a
v
a
.
u
t
i
l
.
c
o
n
c
u
r
r
e
n
t
.
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
.
r
u
n
W
o
r
k
e
r
(
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
.
j
a
v
a
:
1134
)
j
a
v
a
.
u
t
i
l
.
c
o
n
c
u
r
r
e
n
t
.
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809) java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) java.util.concurrent.ThreadPoolExecutor
DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)java.util.concurrent.ThreadPoolExecutorWorker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
[zxl-sso-server:192.168.1.157:3333:dev] 2020-11-14 18:02:27.925 WARN 6472 [restartedMain][173][log] org.apache.catalina.loader.WebappClassLoaderBase The web application [zxl-sso-server] appears to have started a thread named [com.alibaba.nacos.naming.client.listener] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
java.util.concurrent.locks.AbstractQueuedSynchronizer
C
o
n
d
i
t
i
o
n
O
b
j
e
c
t
.
a
w
a
i
t
N
a
n
o
s
(
A
b
s
t
r
a
c
t
Q
u
e
u
e
d
S
y
n
c
h
r
o
n
i
z
e
r
.
j
a
v
a
:
2078
)
j
a
v
a
.
u
t
i
l
.
c
o
n
c
u
r
r
e
n
t
.
L
i
n
k
e
d
B
l
o
c
k
i
n
g
Q
u
e
u
e
.
p
o
l
l
(
L
i
n
k
e
d
B
l
o
c
k
i
n
g
Q
u
e
u
e
.
j
a
v
a
:
467
)
c
o
m
.
a
l
i
b
a
b
a
.
n
a
c
o
s
.
c
l
i
e
n
t
.
n
a
m
i
n
g
.
c
o
r
e
.
E
v
e
n
t
D
i
s
p
a
t
c
h
e
r
ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467) com.alibaba.nacos.client.naming.core.EventDispatcher
ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)com.alibaba.nacos.client.naming.core.EventDispatcherNotifier.run(EventDispatcher.java:114)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
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
:
624
)
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
)
[
z
x
l
−
s
s
o
−
s
e
r
v
e
r
:
192.168.1.157
:
3333
:
d
e
v
]
2020
−
11
−
1418
:
02
:
27.926
W
A
R
N
6472
[
r
e
s
t
a
r
t
e
d
M
a
i
n
]
[
173
]
[
l
o
g
]
o
r
g
.
a
p
a
c
h
e
.
c
a
t
a
l
i
n
a
.
l
o
a
d
e
r
.
W
e
b
a
p
p
C
l
a
s
s
L
o
a
d
e
r
B
a
s
e
T
h
e
w
e
b
a
p
p
l
i
c
a
t
i
o
n
[
z
x
l
−
s
s
o
−
s
e
r
v
e
r
]
a
p
p
e
a
r
s
t
o
h
a
v
e
s
t
a
r
t
e
d
a
t
h
r
e
a
d
n
a
m
e
d
[
c
o
m
.
a
l
i
b
a
b
a
.
n
a
c
o
s
.
n
a
m
i
n
g
.
f
a
i
l
o
v
e
r
]
b
u
t
h
a
s
f
a
i
l
e
d
t
o
s
t
o
p
i
t
.
T
h
i
s
i
s
v
e
r
y
l
i
k
e
l
y
t
o
c
r
e
a
t
e
a
m
e
m
o
r
y
l
e
a
k
.
S
t
a
c
k
t
r
a
c
e
o
f
t
h
r
e
a
d
:
s
u
n
.
m
i
s
c
.
U
n
s
a
f
e
.
p
a
r
k
(
N
a
t
i
v
e
M
e
t
h
o
d
)
j
a
v
a
.
u
t
i
l
.
c
o
n
c
u
r
r
e
n
t
.
l
o
c
k
s
.
L
o
c
k
S
u
p
p
o
r
t
.
p
a
r
k
N
a
n
o
s
(
L
o
c
k
S
u
p
p
o
r
t
.
j
a
v
a
:
215
)
j
a
v
a
.
u
t
i
l
.
c
o
n
c
u
r
r
e
n
t
.
l
o
c
k
s
.
A
b
s
t
r
a
c
t
Q
u
e
u
e
d
S
y
n
c
h
r
o
n
i
z
e
r
Worker.run(ThreadPoolExecutor.java:624) java.lang.Thread.run(Thread.java:748) [zxl-sso-server:192.168.1.157:3333:dev] 2020-11-14 18:02:27.926 WARN 6472 [restartedMain][173][log] org.apache.catalina.loader.WebappClassLoaderBase The web application [zxl-sso-server] appears to have started a thread named [com.alibaba.nacos.naming.failover] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sun.misc.Unsafe.park(Native Method) java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) java.util.concurrent.locks.AbstractQueuedSynchronizer
Worker.run(ThreadPoolExecutor.java:624)java.lang.Thread.run(Thread.java:748)[zxl−sso−server:192.168.1.157:3333:dev]2020−11−1418:02:27.926WARN6472[restartedMain][173][log]org.apache.catalina.loader.WebappClassLoaderBaseThewebapplication[zxl−sso−server]appearstohavestartedathreadnamed[com.alibaba.nacos.naming.failover]buthasfailedtostopit.Thisisverylikelytocreateamemoryleak.Stacktraceofthread:sun.misc.Unsafe.park(NativeMethod)java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)java.util.concurrent.locks.AbstractQueuedSynchronizerConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
java.util.concurrent.ScheduledThreadPoolExecutor
D
e
l
a
y
e
d
W
o
r
k
Q
u
e
u
e
.
t
a
k
e
(
S
c
h
e
d
u
l
e
d
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
.
j
a
v
a
:
1093
)
j
a
v
a
.
u
t
i
l
.
c
o
n
c
u
r
r
e
n
t
.
S
c
h
e
d
u
l
e
d
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093) java.util.concurrent.ScheduledThreadPoolExecutor
DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)java.util.concurrent.ScheduledThreadPoolExecutorDelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
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
:
624
)
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
)
[
z
x
l
−
s
s
o
−
s
e
r
v
e
r
:
192.168.1.157
:
3333
:
d
e
v
]
2020
−
11
−
1418
:
02
:
27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v
a
:
143
)
j
a
v
a
.
n
e
t
.
D
a
t
a
g
r
a
m
S
o
c
k
e
t
.
r
e
c
e
i
v
e
(
D
a
t
a
g
r
a
m
S
o
c
k
e
t
.
j
a
v
a
:
812
)
c
o
m
.
a
l
i
b
a
b
a
.
n
a
c
o
s
.
c
l
i
e
n
t
.
n
a
m
i
n
g
.
c
o
r
e
.
P
u
s
h
R
e
c
e
i
v
e
r
.
r
u
n
(
P
u
s
h
R
e
c
e
i
v
e
r
.
j
a
v
a
:
73
)
j
a
v
a
.
u
t
i
l
.
c
o
n
c
u
r
r
e
n
t
.
E
x
e
c
u
t
o
r
s
Worker.run(ThreadPoolExecutor.java:624) java.lang.Thread.run(Thread.java:748) [zxl-sso-server:192.168.1.157:3333:dev] 2020-11-14 18:02:27.928 WARN 6472 [restartedMain][173][log] org.apache.catalina.loader.WebappClassLoaderBase The web application [zxl-sso-server] appears to have started a thread named [com.alibaba.nacos.naming.push.receiver] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.net.DualStackPlainDatagramSocketImpl.socketReceiveOrPeekData(Native Method) java.net.DualStackPlainDatagramSocketImpl.receive0(DualStackPlainDatagramSocketImpl.java:124) java.net.AbstractPlainDatagramSocketImpl.receive(AbstractPlainDatagramSocketImpl.java:143) java.net.DatagramSocket.receive(DatagramSocket.java:812) com.alibaba.nacos.client.naming.core.PushReceiver.run(PushReceiver.java:73) java.util.concurrent.Executors
Worker.run(ThreadPoolExecutor.java:624)java.lang.Thread.run(Thread.java:748)[zxl−sso−server:192.168.1.157:3333:dev]2020−11−1418:02:27.928WARN6472[restartedMain][173][log]org.apache.catalina.loader.WebappClassLoaderBaseThewebapplication[zxl−sso−server]appearstohavestartedathreadnamed[com.alibaba.nacos.naming.push.receiver]buthasfailedtostopit.Thisisverylikelytocreateamemoryleak.Stacktraceofthread:java.net.DualStackPlainDatagramSocketImpl.socketReceiveOrPeekData(NativeMethod)java.net.DualStackPlainDatagramSocketImpl.receive0(DualStackPlainDatagramSocketImpl.java:124)java.net.AbstractPlainDatagramSocketImpl.receive(AbstractPlainDatagramSocketImpl.java:143)java.net.DatagramSocket.receive(DatagramSocket.java:812)com.alibaba.nacos.client.naming.core.PushReceiver.run(PushReceiver.java:73)java.util.concurrent.ExecutorsRunnableAdapter.call(Executors.java:511)
java.util.concurrent.FutureTask.run$$
c
a
p
t
u
r
e
(
F
u
t
u
r
e
T
a
s
k
.
j
a
v
a
:
266
)
j
a
v
a
.
u
t
i
l
.
c
o
n
c
u
r
r
e
n
t
.
F
u
t
u
r
e
T
a
s
k
.
r
u
n
(
F
u
t
u
r
e
T
a
s
k
.
j
a
v
a
)
j
a
v
a
.
u
t
i
l
.
c
o
n
c
u
r
r
e
n
t
.
S
c
h
e
d
u
l
e
d
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
capture(FutureTask.java:266) java.util.concurrent.FutureTask.run(FutureTask.java) java.util.concurrent.ScheduledThreadPoolExecutor
capture(FutureTask.java:266)java.util.concurrent.FutureTask.run(FutureTask.java)java.util.concurrent.ScheduledThreadPoolExecutorScheduledFutureTask.access
201
(
S
c
h
e
d
u
l
e
d
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
.
j
a
v
a
:
180
)
j
a
v
a
.
u
t
i
l
.
c
o
n
c
u
r
r
e
n
t
.
S
c
h
e
d
u
l
e
d
T
h
r
e
a
d
P
o
o
l
E
x
e
c
u
t
o
r
201(ScheduledThreadPoolExecutor.java:180) java.util.concurrent.ScheduledThreadPoolExecutor
201(ScheduledThreadPoolExecutor.java:180)java.util.concurrent.ScheduledThreadPoolExecutorScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
[zxl-sso-server:192.168.1.157:3333:dev] 2020-11-14 18:02:28.409 ERROR 6472 [restartedMain][40][report] org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter
APPLICATION FAILED TO START
Description:
Field resourceSecurityFilterProviders in com.yger.security.core.authorize.filter.YgerResourceSecurityFilterManager required a bean of type ‘java.util.List’ that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type ‘java.util.List’ in your configuration.
解决:
像这种因为Consider defining a bean of type ‘XXX’ in your configuration.(考虑在配置中定义一个“XXX”类型的bean。)
都是因为Spring IOC出现问题,引发问题的原因有很多,但都可以归为两个类:
1.注册同名多个;
2.没有@Bean注入(或者注入错误),但是@Autowired|@Resource使用了;
解决办法就是固定操作:看控制台信息,肯定会说某个类需要某个类对象,找到这两个类对象,一看就知道为什么注入(@Bean)失败,修改、重启一下就解决了。
另外因为这种IOC出现错误的异常还有其他的,欢迎后面浏览到了,在评论里补充一下,我后面也会留意补充出来。