稳定版。没重构之前。稳定的限流。

This commit is contained in:
Leo
2025-03-04 14:29:48 +08:00
parent 72b7a125e0
commit 645b025172
16 changed files with 182 additions and 130 deletions

54
pom.xml
View File

@@ -15,10 +15,10 @@
<properties>
<java.version>17</java.version>
<spring-boot.version>3.1.5</spring-boot.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>
<spring-boot.version>3.1.5</spring-boot.version> <!-- 推荐使用最新3.1.x -->
<rocketmq.version>2.3.2</rocketmq.version>
<maven.compiler.release>17</maven.compiler.release>
</properties>
<!-- 依赖管理 -->
@@ -54,16 +54,14 @@
<artifactId>mysql-connector-j</artifactId>
<version>8.2.0</version>
</dependency>
<!-- 修改RocketMQ依赖 -->
<dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-spring-boot-starter</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>33.3.1-jre</version>
<version>${rocketmq.version}</version>
</dependency>
<!-- Spring Boot Starter Test测试依赖 -->
<dependency>
<groupId>org.springframework.boot</groupId>
@@ -108,29 +106,38 @@
<artifactId>jdk</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- pom.xml -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-commons</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
</dependency>
</dependencies>
<!-- Maven 插件 -->
<build>
<plugins>
<!-- 核心配置:必须启用 spring-boot-maven-plugin -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>3.1.5</version> <!-- 与你的Spring Boot版本一致 -->
<configuration>
<!-- 显式指定主类(可选,建议添加) -->
<mainClass>cn.van.Application</mainClass>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal> <!-- 关键生成可执行JAR -->
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
@@ -140,5 +147,12 @@
<name>Local Repository</name>
<url>http://192.168.8.88:8081/repository/maven-local88/</url>
</repository>
<!-- 在pom.xml的repositories节点中添加RocketMQ官方仓库 -->
<repository>
<id>rocketmq-repo</id>
<name>RocketMQ Repository</name>
<url>https://repo1.maven.org/maven2/org/apache/rocketmq/</url>
</repository>
</repositories>
</project>