【发布时间】:2012-09-24 15:42:26
【问题描述】:
我正在使用以下注释:
@ActivationConfigProperty(
propertyName = "connectionParameters",
propertyValue = "host=127.0.0.1;port=5445,host=127.0.0.1;port=6600"),
public class TestMDB implements MessageDrivenBean, MessageListener
我想提取这些 IP 地址和端口中的每一个并将它们存储在文件 jmsendpoints.properties... 中,然后动态加载它们。像这样的:
@ActivationConfigProperty(
propertyName = "connectionParameters",
propertyValue = jmsEndpointsProperties.getConnectionParameters()),
public class TestMDB implements MessageDrivenBean, MessageListener
有没有办法做到这一点?
【问题讨论】:
-
您可以拥有动态解析的
propertyValue = "jmsendpoints.properties ConnectionParameter"。
标签: java annotations