当spring注解注入配置:
可用
。
如
:
@
R
a
b
b
i
t
L
i
s
t
e
n
e
r
(
q
u
e
u
e
s
=
"
{}。如:@RabbitListener(queues = "
。如:@RabbitListener(queues="{data.queue}")
当spring注解注入变量:
可用#{}。如:
@Autowire
public String str;
@RabbitListener(queues = “#{str}”)



