Files
pnoker 12dded2225 chore(repo): clear the remaining third-party boot warnings
- springdoc: declare api-docs/swagger-ui enabled explicitly; the boot
  reminder only fires on unset properties, so the intent-declaring
  values keep behavior identical and quiet all six services
- netty: add the macos dns native resolver to the gateway so the
  resolver does not log an error at boot on mac dev machines (the
  no-classifier jar bundles every arch and is inert on linux)
- hibernate-validator HV000271: spring-cloud-gateway 4.3.0 still uses
  container-level @Valid on its List properties. logger-level rules
  cannot suppress it because spring boot's logging re-init installs a
  second loggercontext that resets them, so drop the exact message
  with a turbo filter attached to every context loading this config;
  the class documents the upstream trigger for removal

live verification: five services plus gateway boot with zero warn and
zero error lines, virtual driver included; salt/login probe 200
2026-09-18 18:02:11 +08:00
..

DC3 Common Web

Overview

dc3-common-web is the shared WebFlux configuration module of the IoT DC3 platform. It provides global exception handling, WebFlux request processing configuration, global web filters, and reactive response utilities for all REST-based center services.

Module Information

  • Group ID: io.github.pnoker
  • Artifact ID: dc3-common-web

Key Components

Component Purpose
WebFluxConfig Global WebFlux configuration (codecs, CORS, message converters)
WebFluxSecurityConfig Security chain, public-path rules, and facade-backed authorization
RequestIdWebFilter Adds and propagates request IDs for tracing
ExceptionConfig @ControllerAdvice global exception handler mapping failures to RFC 9457 Problem Details
BaseController Reactive controller helpers plus user/tenant context resolution
PrincipalHeaderUtil Reads the signed principal headers injected by the gateway
SpringDocConfig Shared springdoc/OpenAPI group configuration
ResponseUtil Utilities for writing non-controller ServerHttpResponse bodies in reactive context

Exception Handling

All exceptions thrown by controllers are caught by ExceptionConfig and mapped to an application/problem+json response:

{
  "type": "https://iot-dc3.github.io/problems/validation",
  "title": "Validation failed",
  "status": 400,
  "detail": "limit must be between 1 and 200",
  "instance": "/api/v3/manager/device/list"
}

Build Instructions

mvn -s .mvn/settings.xml -pl dc3-common/dc3-common-web -am package

Testing

Run the module tests from the repository root:

mvn -s .mvn/settings.xml -pl dc3-common/dc3-common-web -am test
  • dc3-common-auth, dc3-common-data, dc3-common-manager — All include this for reactive web support
  • dc3-common-public — Provides shared request, enum and Problem Details models