spring 配置jms和dataSource是要注意
JMS的配置如下
<bean id="activemqConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory" > <property name="brokerURL" value="vm://localhost" /> </bean> <bean class="org.springframework.jms.listener.DefaultMessageListenerContainer" > <property name="connectionFactory" ref="activemqConnectionFactory" /> <property name="sessionTransacted" value="true" /> <property name="destinationName" value="zweb.smtp" /> <property name="messageListener"> <bean class="cn.ceopen.zweb.app.mail.service.impl.AsyncSmtpListenerImpl"> <property name="sender" ref="mailsender" /> <property name="freeMarkerConfig" ref="freeMarkerConfig" /> <property name="mailManager" ref="mailManager" /> </bean> </property> <property name="concurrentConsumers" value="3" /> </bean>
如果spring配置文件用了
default-autowire="byName"
并且同时配置了某个beanid是dataSource
这就会不小心让jms偷吃你的数据库连接了
别问我怎么知道的
这个问题花了几天时间呢
相关推荐
yupi0 2020-10-10
spring 2020-08-18
编程点滴 2020-07-29
幸运小侯子 2020-07-05
itjavashuai 2020-07-04
qingjiuquan 2020-06-29
shushan 2020-06-25
小鱿鱼 2020-06-22
咻pur慢 2020-06-18
melonjj 2020-06-17
qingjiuquan 2020-06-13
neweastsun 2020-06-05
小鱿鱼 2020-06-05
mxcsdn 2020-05-31
吾日五省我身 2020-05-27
牧场SZShepherd 2020-05-27
sweetgirl0 2020-05-14