我有一個使用嵌入式activeMQ 5.11的應用程序。在應用程序開始時,它會在類路徑位置創建activemq-data \ producerBroker \ KahaDB文件夾。我確實想改變位置,但是spring.xml並不需要一個位置。Java中的ActiveMQ數據永久性問題Spring
Spring.xml給出,
<bean id="producerBroker" class="org.apache.activemq.broker.SslBrokerService">
<property name="brokerName" value="producerBroker" />
<property name="persistent" value="true" />
<property name="persistenceAdapter" ref="persistenceAdapter"/>
<property name="transportConnectors">
<list>
<bean class="org.apache.activemq.broker.TransportConnector">
<property name="name" value="xxx"></property>
<property name="uri" value="${transportConnectorURIs}"></property>
</bean>
</list>
</property>
<property name="jmsBridgeConnectors">
<list>
<bean class="org.apache.activemq.network.jms.JmsQueueConnector">
<property name="outboundQueueConnectionFactory">
<bean class="org.apache.activemq.ActiveMQSslConnectionFactory">
<property name="brokerURL" value="${brokerURL}" />
<property name="userName" value="${username}" />
<property name="password" value="${password}" />
<property name="trustStore" value="${trust.store.path}" />
<property name="trustStorePassword" value="${trust.store.password}" />
<!-- <property name="keyStore" value="${key.store.path}"/> -->
<!-- <property name="keyStorePassword" value="${key.store.password}"/> -->
</bean>
</property>
<property name="outboundQueueBridges">
<list>
<bean class="org.apache.activemq.network.jms.OutboundQueueBridge">
<constructor-arg value="${screenshotQueueName}" />
</bean>
<bean class="org.apache.activemq.network.jms.OutboundQueueBridge">
<constructor-arg value="${resultXmlQueueName}" />
</bean>
</list>
</property>
</bean>
</list>
</property>
</bean>
<bean id="persistenceAdapter" class="org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter">
<property name="directory" value="E:\test"/>
目前的問題是,它拋出一個錯誤「的例外是org.springframework.beans.factory.CannotLoadBeanClassException:找不到類[org.apache。 activemq.store.kahadaptor.KahaPersistenceA apter],用於在類路徑資源[spring/resultupload/resultupload.xml]中定義名稱爲'kahaPersistenceAdapter'的Bean;嵌套異常爲java.la g.ClassNotFoundException:org.apache.activemq.store .kahadaptor.KahaPersistenceAdapter「
任何人都有java spring中activeMQ 5.11目錄變化的經驗嗎?
非常感謝。我能夠使它與給定的信息一起工作。 – CCoder