Master Spring Cloud Config with SCCA: Visual Management & Deployment Guide
This guide introduces the open‑source SCCA project that adds a visual management layer to Spring Cloud Config, explains its architecture, multiple deployment modes, detailed configuration for Git and DB storage, service‑discovery integration, and provides step‑by‑step instructions for building and using the REST and UI modules in Spring Boot applications.
Overview
Spring Cloud Config supplies a configuration‑center for Spring Cloud micro‑service architectures, but its native UI is minimal. The Spring Cloud Config Admin (SCCA) project adds a full‑featured visual management layer that abstracts service governance, configuration storage, and UI operations, making it compatible with any Spring Cloud Config deployment.
Architecture
SCCA follows a front‑back separation. The core module defines the operations required by the UI, while persistence and discovery modules isolate different configuration repositories (Git, JDBC) and service‑registry mechanisms (Eureka, Consul). This design lets users combine storage back‑ends and discovery solutions without changing the UI.
Deployment Modes
Full‑Separation Mode
Each component—Spring Cloud Config Server, SCCA REST server, and SCCA UI server—runs as an independent process, allowing high availability for each.
Semi‑Separation Mode
The UI and REST modules are merged into a single process, reducing deployment complexity while still supporting an existing Config Server.
All‑In‑One Mode
All three modules are packaged into a single Spring Boot application, simplifying deployment for new users.
Spring Cloud Config Server Configuration
Git Backend
spring.cloud.config.server.git.uri=https://github.com/dyc87112/{application}.git
spring.cloud.config.server.git.username=
spring.cloud.config.server.git.password=Each application name maps to a separate Git repository. Configuration files follow the pattern application-{profile}.properties.
Database Backend
# Enable JDBC profile
spring.profiles.active=jdbc
spring.cloud.config.server.jdbc.sql=SELECT `p_key`,`p_value` FROM property a, project b, env c, label d WHERE a.project_id=b.id AND a.env_id=c.id AND a.label_id=d.id AND b.name=? AND c.name=? AND d.name=?
spring.datasource.url=jdbc:mysql://localhost:3306/config-db
spring.datasource.username=root
spring.datasource.password=
spring.datasource.driver-class-name=com.mysql.jdbc.DriverThe same datasource must be used by the SCCA REST module when DB storage is selected.
SCCA REST Server
Maven dependencies
<dependency>
<groupId>com.didispace</groupId>
<artifactId>scca-rest</artifactId>
<version>1.0.0-RELEASE</version>
</dependency>
<dependency>
<groupId>com.didispace</groupId>
<artifactId>scca-persistence-git</artifactId>
<version>1.0.0-RELEASE</version>
</dependency>Git‑mode properties
scca.git.username: Git username scca.git.password: Git password scca.git.repo-uri: Repository URL (must match spring.cloud.config.server.git.uri) scca.git.base-path: Relative path for configuration files (matches spring.cloud.config.server.git.search-paths) scca.git.file-pattern: Naming pattern, e.g.
application-{profile}.propertiesDatabase‑mode properties
spring.datasource.url: JDBC URL of the configuration database
spring.datasource.username spring.datasource.password spring.datasource.driver-class-nameService Discovery Integration
Eureka
<dependency>
<groupId>com.didispace</groupId>
<artifactId>scca-discovery-eureka</artifactId>
<version>1.0.0-RELEASE</version>
</dependency>
eureka.client.serviceUrl.defaultZone=http://eureka.didispace.com/eureka/Consul
<dependency>
<groupId>com.didispace</groupId>
<artifactId>scca-discovery-consul</artifactId>
<version>1.0.0-RELEASE</version>
</dependency>
spring.cloud.consul.host=localhost
spring.cloud.consul.port=8500All REST endpoints are prefixed by the context path:
scca.rest.context-path=/xhrSCCA UI Server
Maven dependency
<dependency>
<groupId>com.didispace</groupId>
<artifactId>scca-ui</artifactId>
<version>1.0.0-RELEASE</version>
</dependency>Configuration options for the UI: scca.ui.rest-server-url: Direct URL of the REST server (e.g. http://localhost:10130) scca.ui.rest-server-name: Service‑discovery name of the REST server scca.ui.rest-server-context-path: Must match scca.rest.context-path (default /xhr)
Management UI
After deploying any mode, the UI is reachable at http://localhost:10032/admin/ (port may vary). The UI provides:
System configuration – define environments (profile, service name, registry address) and environment‑specific parameters (e.g., Redis, Eureka URLs). Encryption keys can be stored for batch encryption of sensitive properties.
Project management – maps Spring Cloud Config concepts to UI entities: Project name ↔ application , Environment ↔ profile , Label ↔ label (default master).
Configuration management – edit, encrypt, version configuration files, perform one‑click replacements based on environment parameters, and refresh configurations via the /refresh endpoint.
Client Integration
Absolute‑Address Access
spring.application.name=config-client
server.port=12000
spring.cloud.config.uri=http://localhost:10032/scca-config-server
spring.cloud.config.profile=stage
spring.cloud.config.label=masterService‑Discovery Access
spring.application.name=config-client
server.port=12000
spring.cloud.config.discovery.enabled=true
spring.cloud.config.discovery.serviceId=config-server
spring.cloud.config.profile=stage
spring.cloud.config.label=masterBoth approaches allow the client to inject configuration values, for example:
@RefreshScope
@RestController
public class TestController {
@Value("${a.b.c}")
private String abc;
@RequestMapping("/abc")
public String abc() { return this.abc; }
} @Valueinjects the property value, while @RefreshScope enables runtime refresh via the /refresh endpoint.
Conclusion
SCCA extends Spring Cloud Config with a comprehensive visual management UI, supports multiple deployment topologies, integrates with Git, relational databases, Eureka, and Consul, and provides clear client‑side usage examples, making configuration management for Spring Cloud micro‑services more accessible and maintainable.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Programmer DD
A tinkering programmer and author of "Spring Cloud Microservices in Action"
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
