1

我尝试将 activemq Web 控制台附加到我的控制台应用程序。这是我的应用程序的 context.xml:

<beans xmlns="http://www.springframework.org/schema/beans"
...
 <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="locations">
        <value>activemq.properties</value>
    </property>
 </bean> 

<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="locations">
        <value>file:${activemq.base}/conf/credentials.properties</value>
    </property>
</bean>
...

<import resource="${activemq.base}/conf/jetty.xml" />
...

我的 activemq.properties 文件包含:activemq.base=D:\development\apache-activemq-5.6.0

我不断收到错误消息,例如 "Could not resolve placeholder 'activemq.base'" ,但它实际上是写在 .properties 文件中的。

我用谷歌搜索了大量的网页和解决方案,其中大多数都说必须指定 activemq.base。这里有没有我看不到的错误?

先感谢您!

编辑:

试图将配置部分更改为:

<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="locations">
        <list>
            <value>activemq.properties</value>
            <value>file:${activemq.base}/conf/credentials.properties</value>
        </list>
    </property>
</bean>

但仍然没有变化。一样的东西。

4

0 回答 0