first commit

This commit is contained in:
abcv7
2026-02-25 15:08:40 +08:00
commit 7f1d83ada7
2003 changed files with 144362 additions and 0 deletions
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>sfbx-framework</artifactId>
<groupId>com.itheima.sfbx</groupId>
<version>2.0-SNAPSHOT</version>
</parent>
<!--基础模块-mybatis-plus支持-->
<artifactId>framework-rabbitmq</artifactId>
<name>framework-rabbitmq</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<dependencies>
<dependency>
<groupId>com.itheima.sfbx</groupId>
<artifactId>framework-commons</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,37 @@
package com.itheima.sfbx.framework.rabbitmq.pojo;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.sql.Timestamp;
/**
* @DescriptionRabbit消息封装
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class MqMessage implements Serializable {
/**消息id**/
private Long id;
/**标题**/
private String title;
/**消息内容**/
private String content;
/**业务类型**/
private String messageType;
/**产生时间**/
private Timestamp produceTime;
/**发送人**/
private String sender;
}
@@ -0,0 +1,17 @@
package com.itheima.sfbx.framework.rabbitmq.sink;
import org.springframework.cloud.stream.annotation.Input;
import org.springframework.messaging.SubscribableChannel;
/**
* @ClassName LogSink.java
* @Description 日志接收
*/
public interface FileSink {
public static String FILE_INPUT="file-input";
@Input(FILE_INPUT)
SubscribableChannel fileInput();
}
@@ -0,0 +1,17 @@
package com.itheima.sfbx.framework.rabbitmq.sink;
import org.springframework.cloud.stream.annotation.Input;
import org.springframework.messaging.SubscribableChannel;
/**
* @ClassName LogSink.java
* @Description 日志接收
*/
public interface LogSink {
public static String LOG_INPUT="log-input";
@Input(LOG_INPUT)
SubscribableChannel logInput();
}
@@ -0,0 +1,16 @@
package com.itheima.sfbx.framework.rabbitmq.sink;
import org.springframework.cloud.stream.annotation.Input;
import org.springframework.messaging.SubscribableChannel;
/**
* @ClassName SmsSink.java
* @Description 短信接受
*/
public interface SmsSink {
public static String SMS_INPUT="sms-input";
@Input(SMS_INPUT)
SubscribableChannel smsInput();
}
@@ -0,0 +1,16 @@
package com.itheima.sfbx.framework.rabbitmq.sink;
import org.springframework.cloud.stream.annotation.Input;
import org.springframework.messaging.SubscribableChannel;
/**
* @ClassName SmsSink.java
* @Description 交易结果接受
*/
public interface TradeSink {
public static String TRADE_INPUT="trade-input";
@Input(TRADE_INPUT)
SubscribableChannel tradeInput();
}
@@ -0,0 +1,16 @@
package com.itheima.sfbx.framework.rabbitmq.sink;
import org.springframework.cloud.stream.annotation.Input;
import org.springframework.messaging.SubscribableChannel;
/**
* @ClassName WarrantySink.java
* @Description 合同延迟接受
*/
public interface WarrantySink {
public static String WARRANTY_INPUT="warranty-input";
@Input(WARRANTY_INPUT)
SubscribableChannel warrantyInput();
}
@@ -0,0 +1,16 @@
package com.itheima.sfbx.framework.rabbitmq.source;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.messaging.MessageChannel;
/**
* @ClassName FileSource.java
* @Description 文件消息队列的发送者
*/
public interface FileSource {
public static String FILE_OUTPUT = "file-output";
@Output(FILE_OUTPUT)
MessageChannel fileOutput();
}
@@ -0,0 +1,16 @@
package com.itheima.sfbx.framework.rabbitmq.source;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.messaging.MessageChannel;
/**
* @ClassName LogSource.java
* @Description 日志发送
*/
public interface LogSource {
public static String LOG_OUTPUT = "log-output";
@Output(LOG_OUTPUT)
MessageChannel logOutput();
}
@@ -0,0 +1,16 @@
package com.itheima.sfbx.framework.rabbitmq.source;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.messaging.MessageChannel;
/**
* @ClassName SmsSource.java
* @Description 短信发送
*/
public interface SmsSource {
public static String SMS_OUTPUT = "sms-output";
@Output(SMS_OUTPUT)
MessageChannel smsOutput();
}
@@ -0,0 +1,16 @@
package com.itheima.sfbx.framework.rabbitmq.source;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.messaging.MessageChannel;
/**
* @ClassName SmsSource.java
* @Description 交易结果发送
*/
public interface TradeSource {
public static String TRADE_OUTPUT = "trade-output";
@Output(TRADE_OUTPUT)
MessageChannel tradeOutput();
}
@@ -0,0 +1,16 @@
package com.itheima.sfbx.framework.rabbitmq.source;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.messaging.MessageChannel;
/**
* @ClassName WarrantySource.java
* @Description 合同延迟发送
*/
public interface WarrantySource {
public static String WARRANTY_OUTPUT = "warranty-output";
@Output(WARRANTY_OUTPUT)
MessageChannel warrantyOutput();
}