From 6b344d83244a33f44d18d2f032aea8bb06dfc65d Mon Sep 17 00:00:00 2001 From: wxy <14293288+zysysys@user.noreply.gitee.com> Date: Wed, 31 Jul 2024 09:13:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 38 ++ .idea/$PROJECT_FILE$ | 468 ++++++++++++++++++ .idea/.gitignore | 8 + .idea/encodings.xml | 7 + .idea/inspectionProfiles/Project_Default.xml | 5 + .idea/misc.xml | 34 ++ .idea/qaplug_profiles.xml | 465 +++++++++++++++++ .idea/setting.xml | 8 + .idea/vcs.xml | 6 + pom.xml | 38 ++ .../com/nuyu/common/rabbit/RabbitConfig.java | 29 ++ ...ot.autoconfigure.AutoConfiguration.imports | 1 + 12 files changed, 1107 insertions(+) create mode 100644 .gitignore create mode 100644 .idea/$PROJECT_FILE$ create mode 100644 .idea/.gitignore create mode 100644 .idea/encodings.xml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/qaplug_profiles.xml create mode 100644 .idea/setting.xml create mode 100644 .idea/vcs.xml create mode 100644 pom.xml create mode 100644 src/main/java/com/nuyu/common/rabbit/RabbitConfig.java create mode 100644 src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/.gitignore @@ -0,0 +1,38 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/.idea/$PROJECT_FILE$ b/.idea/$PROJECT_FILE$ new file mode 100644 index 0000000..c1ce1bb --- /dev/null +++ b/.idea/$PROJECT_FILE$ @@ -0,0 +1,468 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..35410ca --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..aa00ffa --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..8d66637 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..9fc3d5f --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + 用户定义 + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/qaplug_profiles.xml b/.idea/qaplug_profiles.xml new file mode 100644 index 0000000..3dfd21f --- /dev/null +++ b/.idea/qaplug_profiles.xml @@ -0,0 +1,465 @@ + + + + + \ No newline at end of file diff --git a/.idea/setting.xml b/.idea/setting.xml new file mode 100644 index 0000000..ed05fd8 --- /dev/null +++ b/.idea/setting.xml @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..aebb8fe --- /dev/null +++ b/pom.xml @@ -0,0 +1,38 @@ + + + + 4.0.0 + + com.muyu + cloud-common + 3.6.3 + + + cloud-common-rabbit + 1.0.0 + + + 17 + 17 + UTF-8 + + + + + + com.muyu + cloud-common-core + + + + org.springframework.boot + spring-boot-starter-amqp + + + + + + + diff --git a/src/main/java/com/nuyu/common/rabbit/RabbitConfig.java b/src/main/java/com/nuyu/common/rabbit/RabbitConfig.java new file mode 100644 index 0000000..a99b61c --- /dev/null +++ b/src/main/java/com/nuyu/common/rabbit/RabbitConfig.java @@ -0,0 +1,29 @@ +package com.nuyu.common.rabbit; + +import lombok.AllArgsConstructor; +import lombok.extern.log4j.Log4j2; +import org.springframework.amqp.core.AmqpAdmin; +import org.springframework.amqp.core.AmqpTemplate; +import org.springframework.context.annotation.Configuration; + +import javax.annotation.PostConstruct; + +/** + * @Author: wangxinyuan + * @Date: 2024/7/31 上午8:48 + */ +@Log4j2 +@Configuration +@AllArgsConstructor +public class RabbitConfig { + + + private final AmqpAdmin amqpAdmin; + + private final AmqpTemplate amqpTemplate; + + @PostConstruct + public void init(){ + log.info("初始化RabbitMQ"); + } +} diff --git a/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000..0dbbfb0 --- /dev/null +++ b/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +com.nuyu.common.rabbit.RabbitConfig