Centralized configuration for ordered-system, built on Spring Cloud Config Server (native profile — config is bundled as a classpath resource rather than pulled from a separate Git repo, which is simpler for a project of this size).
The main thing every service needs but shouldn't each configure independently is the JWT signing secret: ordered-gateway verifies incoming tokens, ordered-user-service issues them, and both need to agree on the exact same key. Instead of duplicating JWT_SECRET across services' environment variables, only ordered-config-server needs it set — every other service fetches it from here on startup via spring.config.import: optional:configserver:....
# what it currently overrides for every consuming service
app.jwt.secret: ${JWT_SECRET}
ordered.gateway.security.jwt-secret: ${JWT_SECRET}Java 21 · Spring Boot 4.1.0 · Spring Cloud Config Server (native profile)
This is the very first thing to start, before eureka and before any business service.
JWT_SECRET=some-dev-secret-at-least-256-bits-long ./mvnw spring-boot:runRuns on port 8888 (override with PORT). If JWT_SECRET isn't set, it falls back to an obviously-fake placeholder locally (change-me-in-prod-min-256-bits-long-please-replace) — fine for local dev, never for anything public-facing.
Sanity check it's serving config correctly:
curl http://localhost:8888/order-service/defaultdocker build -t ordered-config-server .
docker run -p 8888:8888 -e JWT_SECRET=... ordered-config-servermake testPart of the ordered-system organization. See ordered-infra to run the whole platform together, including production secret handling via .env.prod.
MIT — see LICENSE.