今天发现公司的自定义标签autoStart不支持属性文件 autoStart="${boot.mq}",看过源代码确实是直接读出的
String autoStart = element.getAttribute("autoStart");
if ((autoStart == null) || (autoStart.isEmpty()) || (autoStart.equals("true"))) {
builder.setInitMethodName("open");
}
element.getAttribute("autoStart")是不做$解析的
附配置文件
<mq:consumerListener id="consumer" connectionFactory="connectionFactory" concurrency="${mq.consumer.concurrency}"
exceptionListener="retryContainer" autoStart="${boot.mq}">
<mq:listener destination="${mq.destination.consumer}" messageListener="mqMessageListener" />
</mq:consumerListener>