[重大更新] 新增 ruoyi-common-bus 消息总线组件 基于MQ跨服务投递事件消息

This commit is contained in:
疯狂的狮子Li
2024-06-19 00:28:24 +08:00
parent d28cdcd0e1
commit 9a27f42867
12 changed files with 122 additions and 7 deletions

View File

@@ -22,6 +22,10 @@
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-core</artifactId>
</dependency>
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-bus</artifactId>
</dependency>
</dependencies>

View File

@@ -1,18 +1,20 @@
package org.dromara.workflow.api.domain.event;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.utils.SpringUtils;
import org.springframework.cloud.bus.event.RemoteApplicationEvent;
import java.io.Serial;
import java.io.Serializable;
/**
* 总体流程监听
*
* @author may
*/
@Data
public class ProcessEvent implements Serializable {
@EqualsAndHashCode(callSuper = true)
public class ProcessEvent extends RemoteApplicationEvent {
@Serial
private static final long serialVersionUID = 1L;
@@ -37,4 +39,8 @@ public class ProcessEvent implements Serializable {
*/
private boolean submit;
public ProcessEvent() {
super(new Object(), SpringUtils.getApplicationName(), DEFAULT_DESTINATION_FACTORY.getDestination(null));
}
}

View File

@@ -1,18 +1,20 @@
package org.dromara.workflow.api.domain.event;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.utils.SpringUtils;
import org.springframework.cloud.bus.event.RemoteApplicationEvent;
import java.io.Serial;
import java.io.Serializable;
/**
* 流程办理监听
*
* @author may
*/
@Data
public class ProcessTaskEvent implements Serializable {
@EqualsAndHashCode(callSuper = true)
public class ProcessTaskEvent extends RemoteApplicationEvent {
@Serial
private static final long serialVersionUID = 1L;
@@ -37,4 +39,7 @@ public class ProcessTaskEvent implements Serializable {
*/
private String businessKey;
public ProcessTaskEvent() {
super(new Object(), SpringUtils.getApplicationName(), DEFAULT_DESTINATION_FACTORY.getDestination(null));
}
}