From 0a28d7b9d64cc98ed256c514fbe70336c586a583 Mon Sep 17 00:00:00 2001 From: bunny <1319900154@qq.com> Date: Sun, 18 May 2025 22:02:38 +0800 Subject: [PATCH] =?UTF-8?q?:tada:=20RabbitMQ=E5=A4=8D=E4=B9=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mq-demo/.gitignore | 33 +++++ mq-demo/pom.xml | 132 ++++++++++++++++++ .../cn/bunny/mq/mqdemo/MqDemoApplication.java | 11 ++ mq-demo/src/main/resources/application.yaml | 5 + .../mq/mqdemo/MqDemoApplicationTests.java | 13 ++ 5 files changed, 194 insertions(+) create mode 100644 mq-demo/.gitignore create mode 100644 mq-demo/pom.xml create mode 100644 mq-demo/src/main/java/cn/bunny/mq/mqdemo/MqDemoApplication.java create mode 100644 mq-demo/src/main/resources/application.yaml create mode 100644 mq-demo/src/test/java/cn/bunny/mq/mqdemo/MqDemoApplicationTests.java diff --git a/mq-demo/.gitignore b/mq-demo/.gitignore new file mode 100644 index 0000000..549e00a --- /dev/null +++ b/mq-demo/.gitignore @@ -0,0 +1,33 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ diff --git a/mq-demo/pom.xml b/mq-demo/pom.xml new file mode 100644 index 0000000..1fadd0d --- /dev/null +++ b/mq-demo/pom.xml @@ -0,0 +1,132 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 3.4.5 + + + cn.bunny.mq + mq-demo + 0.0.1-SNAPSHOT + mq-demo + mq-demo + + + + + + + + + + + + + + + 17 + 1.3.5 + + + + org.springframework.boot + spring-boot-starter-amqp + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.amqp + spring-rabbit-stream + + + org.springframework.modulith + spring-modulith-events-api + + + org.springframework.modulith + spring-modulith-starter-core + + + + org.springframework.boot + spring-boot-devtools + runtime + true + + + org.springframework.modulith + spring-modulith-events-amqp + runtime + + + org.projectlombok + lombok + true + + + org.springframework.boot + spring-boot-starter-test + test + + + org.springframework.amqp + spring-rabbit-test + test + + + org.springframework.modulith + spring-modulith-starter-test + test + + + + + + org.springframework.modulith + spring-modulith-bom + ${spring-modulith.version} + pom + import + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + org.projectlombok + lombok + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + org.projectlombok + lombok + + + + + + + + diff --git a/mq-demo/src/main/java/cn/bunny/mq/mqdemo/MqDemoApplication.java b/mq-demo/src/main/java/cn/bunny/mq/mqdemo/MqDemoApplication.java new file mode 100644 index 0000000..67bc8c8 --- /dev/null +++ b/mq-demo/src/main/java/cn/bunny/mq/mqdemo/MqDemoApplication.java @@ -0,0 +1,11 @@ +package cn.bunny.mq.mqdemo; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class MqDemoApplication { + public static void main(String[] args) { + SpringApplication.run(MqDemoApplication.class, args); + } +} diff --git a/mq-demo/src/main/resources/application.yaml b/mq-demo/src/main/resources/application.yaml new file mode 100644 index 0000000..24106c6 --- /dev/null +++ b/mq-demo/src/main/resources/application.yaml @@ -0,0 +1,5 @@ +spring: + application: + name: mq-demo +server: + port: 7070 \ No newline at end of file diff --git a/mq-demo/src/test/java/cn/bunny/mq/mqdemo/MqDemoApplicationTests.java b/mq-demo/src/test/java/cn/bunny/mq/mqdemo/MqDemoApplicationTests.java new file mode 100644 index 0000000..238c960 --- /dev/null +++ b/mq-demo/src/test/java/cn/bunny/mq/mqdemo/MqDemoApplicationTests.java @@ -0,0 +1,13 @@ +package cn.bunny.mq.mqdemo; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class MqDemoApplicationTests { + + @Test + void contextLoads() { + } + +}