<?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">
|
<parent>
|
<artifactId>jnpf-java-cloud</artifactId>
|
<groupId>com.jnpf</groupId>
|
<version>6.1.0-RELEASE</version>
|
<relativePath>../../pom.xml</relativePath>
|
</parent>
|
<modelVersion>4.0.0</modelVersion>
|
|
<artifactId>jnpf-common-springaop</artifactId>
|
|
<dependencies>
|
<dependency>
|
<groupId>org.aspectj</groupId>
|
<artifactId>aspectjweaver</artifactId>
|
</dependency>
|
<dependency>
|
<groupId>org.springframework.boot</groupId>
|
<artifactId>spring-boot-starter-web</artifactId>
|
</dependency>
|
<!--系统监控 Boot Admin 使用-->
|
<dependency>
|
<groupId>org.springframework.boot</groupId>
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
</dependency>
|
<!--prometheus监测-->
|
<!--<dependency>
|
<groupId>io.micrometer</groupId>
|
<artifactId>micrometer-registry-prometheus</artifactId>
|
</dependency>-->
|
|
<dependency>
|
<groupId>com.jnpf</groupId>
|
<artifactId>jnpf-common-file</artifactId>
|
<version>${project.version}</version>
|
</dependency>
|
<dependency>
|
<groupId>com.jnpf</groupId>
|
<artifactId>jnpf-common-security</artifactId>
|
<version>${project.version}</version>
|
</dependency>
|
<dependency>
|
<groupId>com.jnpf</groupId>
|
<artifactId>jnpf-provider-system</artifactId>
|
<version>${project.version}</version>
|
</dependency>
|
<dependency>
|
<groupId>com.jnpf</groupId>
|
<artifactId>jnpf-common-i18n</artifactId>
|
</dependency>
|
|
<!--sentinel-->
|
<dependency>
|
<groupId>com.alibaba.cloud</groupId>
|
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
</dependency>
|
<!-- sentinel-datasource-nacos 已于 2026-08-11 移除(补丁 #14):
|
它是「Sentinel 从 Nacos 拉限流规则」的数据源适配器,自身仅 6KB,
|
却拖进 nacos-client 13.7MB(合计 13.26MB / 每个 fat jar)。
|
补丁 #8 摘掉 Nacos 后,全仓库已无任何未注释的 spring.cloud.sentinel.datasource.*
|
配置(各服务 application.yml 里那几段 nacos datasource 全是注释),
|
该适配器没有任何消费者——NacosDataSource 只在有对应配置时才被
|
SentinelDataSourceHandler 实例化,纯死重量。
|
若将来要恢复「限流规则外部化」,别加回 Nacos,用 Sentinel 的 file/apollo 数据源。 -->
|
<!-- swagger模块 -->
|
<dependency>
|
<groupId>com.jnpf</groupId>
|
<artifactId>jnpf-common-swagger</artifactId>
|
</dependency>
|
|
<!-- ══ 消息中间件 binder(2026-08-10 由 RocketMQ 改为「无 binder」)══
|
登记:tasks/jnpf-platform-patches.md 补丁 #10
|
|
这里是 binder 真正的生效点。dependency:tree 实证,各业务服务拿到 RocketMQ 的
|
路径是 <service> → *-controller → jnpf-common-springaop → 本依赖,
|
**不是** jnpf-cloud-base → jnpf-common-mq(那条上的 exclusion 只是防御性的)。
|
|
事件总线已切 Redis pub/sub(config/shared/system-config.yaml 的
|
event.event-publish-type: redis),走 JNPF 官方 ProjectEventRedisSender,
|
业务代码零改动,故 binder 不再需要。收益:
|
① 每个 fat jar 瘦约 32 MB(rocketmq-rocksdb 单个 29 MB + client/remoting/
|
proto/acl/logback 等),×14 个服务镜像;
|
② (2026-08-11 失效)原写"AUDIT_EVENT 的 streamBridge.send 立即失败 → 走三级降级
|
第二级 Feign"。审计投递已不走 streamBridge,降级链改为 Feign → spool 两级;
|
收益 ① 的瘦身仍然成立。
|
|
🔴 保留 spring-cloud-stream **核心**(下方),不能一起删——
|
2026-08-11 订正归因:原写"因为 audit-sdk 把 StreamBridge 写在构造参数上",该理由已失效。
|
真正的使用者是 jnpf-common-mq 这个二进制 jar 自己(javap 实查:ProjectEventMQSender、
|
MqAutoConfiguration$MqExistsdConfiguration 常量池均引用 StreamBridge)。
|
当前 redis 档下那个内部配置类不装配、暂不触发类加载,但改回 mq 即
|
NoClassDefFoundError,报错形态与「没配 binder」完全不同,极难排查。
|
|
🔴 前置条件:config/shared/mq.yaml 必须有
|
`spring.cloud.stream.function.autodetect: false`。否则 SCS 会自动发现
|
jnpf-common-mq 里那个未受 event-publish-type 门控的 ssoEventReceiver bean
|
并为它建绑定,而此时已无任何 binder →「有绑定却无 binder」启动即失败。
|
|
要换 RabbitMQ / Kafka:解开下面对应注释即可(业务代码不动,
|
改 config/shared/mq.yaml 的 binder 段配地址)。 -->
|
<dependency>
|
<groupId>org.springframework.cloud</groupId>
|
<artifactId>spring-cloud-stream</artifactId>
|
</dependency>
|
<!--RocketMQ(2026-08-10 停用,见上)-->
|
<!--<dependency>
|
<groupId>com.alibaba.cloud</groupId>
|
<artifactId>spring-cloud-starter-stream-rocketmq</artifactId>
|
</dependency>-->
|
<!--RabbitMQ-->
|
<!--<dependency>
|
<groupId>org.springframework.cloud</groupId>
|
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
|
</dependency>-->
|
<!--Kafka-->
|
<!--<dependency>
|
<groupId>org.springframework.cloud</groupId>
|
<artifactId>spring-cloud-starter-stream-kafka</artifactId>
|
</dependency>-->
|
<!--微服务配置-->
|
<dependency>
|
<groupId>com.jnpf</groupId>
|
<artifactId>jnpf-cloud-base</artifactId>
|
<version>${project.version}</version>
|
</dependency>
|
</dependencies>
|
|
</project>
|