Spring boot Flowable中的邮件服务任务抛出api.FlowableException-java.net.ConnectException:连接被拒绝
在我们的项目中,我们有一个任务,即在某个任务完成后向某个用户发送通知 以下是用BPMN2.0 xml编写的代码-Spring boot Flowable中的邮件服务任务抛出api.FlowableException-java.net.ConnectException:连接被拒绝,spring-boot,activiti,flowable,Spring Boot,Activiti,Flowable,在我们的项目中,我们有一个任务,即在某个任务完成后向某个用户发送通知 以下是用BPMN2.0 xml编写的代码- <serviceTask id="notifyPartner" name="Notify Partner" flowable:type="mail"> <documentation>Notify Partner about the assignment.</documentation> <extensionElemen
<serviceTask id="notifyPartner" name="Notify Partner" flowable:type="mail">
<documentation>Notify Partner about the assignment.</documentation>
<extensionElements>
<flowable:field name="to">
<flowable:string><![CDATA[testemail@some.com]]></flowable:string>
</flowable:field>
<flowable:field name="from">
<flowable:string><![CDATA[testemail@some.com]]></flowable:string>
</flowable:field>
<flowable:field name="subject">
<flowable:string><![CDATA[Notify Partner]]></flowable:string>
</flowable:field>
<flowable:field name="text">
<flowable:string><![CDATA[Notify Partner about the assignment.]]></flowable:string>
</flowable:field>
</extensionElements>
</serviceTask>
但所有这些都没有成功。它给出了以下错误-
java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
我甚至还尝试在flowable.cfg.xml中设置所有属性
<property name="mailServerHost" value="smtp.gmail.com" />
<property name="mailServerPort" value="587" />
<property name="mailServerUseTls" value="true" />
<property name="mailServerUsername" value="testemail@some.com" />
<property name="mailServerPassword" value="****" />
是否缺少任何其他配置?
所使用的可流动版本为6.2.1。如果您使用可流动版本6.2.1的Spring启动程序,则需要从您的属性中删除引导的
Spring。
您的属性应该如下所示:
flowable.mailServerHost=smtp.gmail.com
flowable.mailServerPort=587
flowable.mailServerUserName=testemail@some.com
flowable.mailServerPassword=****
flowable.mailServerUseTls=true
flowable.mail.server.host=smtp.gmail.com
flowable.mail.server.port=587
flowable.mail.server.username=testemail@some.com
flowable.mail.server.password=****
flowable.mail.server.use-tls=true
使用Spring Boot时,flowable.cfg.xml
不用于配置引擎
注意:迁移到Flowable 6.3.x时,属性稍有更改,需要如下所示:
flowable.mailServerHost=smtp.gmail.com
flowable.mailServerPort=587
flowable.mailServerUserName=testemail@some.com
flowable.mailServerPassword=****
flowable.mailServerUseTls=true
flowable.mail.server.host=smtp.gmail.com
flowable.mail.server.port=587
flowable.mail.server.username=testemail@some.com
flowable.mail.server.password=****
flowable.mail.server.use-tls=true