发送邮件时发送Grails 3 JMS错误

时间:2017-01-05 14:47:41

标签: jms grails3

由于问题https://github.com/gpc/jms/issues/27,我已添加到application.yml

jms:
containers:
    standard:
        connectionFactoryBean: jmsConnectionFactory

adapters:
    standard:
        messageConverterBean: standardJmsMessageConverter
        persistenceInterceptorBean: persistenceInterceptor

应用程序启动,但在发送消息应用程序时出错

  

org.springframework.beans.factory.NoSuchBeanDefinitionException:没有   名为'standardJmsTemplate'的bean定义于   org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:704)   在   org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1175)   在   org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284)   在   org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)   在   org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1054)   在   org.springframework.beans.factory.BeanFactory $ $的getBean 3.call(未知   来源)at   grails.plugin.jms.JmsService.normalizeServiceCtx(JmsService.groovy:381)   at sun.reflect.GeneratedMethodAccessor1971.invoke(Unknown Source)at   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)   在java.lang.reflect.Method.invoke(Method.java:498)at   org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite $ PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)   在   org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)   在   org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)   在grails.plugin.jms.JmsService.send(JmsService.groovy:147)at   grails.plugin.jms.JmsService.send(JmsService.groovy)at   grails.plugin.jms.JmsService $ send.call(未知来源)

Grails 3.1.14 org.grails.plugins:JMS:2.0.0.RC1

我希望错误可以通过配置来解决

1 个答案:

答案 0 :(得分:0)

不知道它是如何工作的,但是由application.yml中的其他行修复(刚从插件代码中复制)

jms:
    templates:
        standard:
            connectionFactoryBean: jmsConnectionFactory
            messageConverterBean: standardJmsMessageConverter