mirror of
https://gitee.com/pnoker/iot-dc3.git
synced 2026-11-02 11:11:57 +08:00
Adds a startup-time registrar that scans the local WebFlux handler mappings of each center service and reconciles the discovered endpoints against dc3_api and dc3_resource (insert-if-missing, update-if-drifted, soft-delete- if-orphaned), so the permission model is no longer hand-maintained. Wiring: - dc3-common-resource-registrar (new module): scanner, diff runner, Spring Boot AutoConfiguration. Activates on ApplicationReadyEvent. - dc3-common-facade-api: ResourceRegistryFacade + BOs define a transport- neutral sync contract. - dc3-common-facade-local / dc3-common-facade-grpc: two implementations selected via dc3.facade.mode. center-auth/single use local; manager/data call auth via gRPC. - dc3-common-auth: biz-side ResourceRegistrySyncService performs the three- way diff inside a transaction guarded by pg_advisory_xact_lock(hashtext (serviceName)); exposes ResourceRegistryApi gRPC server. - dc3-api-auth: new resource_registry.proto contract. - ApiDO/BO/VO/Query gain a serviceName field so each service's endpoints can be located with a single indexed lookup. Deployment-visible changes: - api_code format is the human-readable serviceName:METHOD:/path - dc3_resource.resource_code format is api:serviceName:METHOD:/path (prefixed namespace reserved for future resource types) - center-auth application.yml sets dc3.facade.mode=local - 4 center pom.xml files pull in the registrar (auth also gets facade-local)