configprops
configprops: The Complete Guide to Inspecting and Troubleshooting Spring Boot Configuration Properties
Key Takeaways
- configprops is an Actuator endpoint that exposes all merged configuration properties from Spring Boot's Environment at runtime.
- It is disabled by default in production for security reasons—properties like passwords and API keys must never be exposed publicly.
- Use
configpropsto diagnose why a@Valueor@ConfigurationPropertiesbinding is failing, to audit property precedence, and to verify profile-specific overrides. - The endpoint is accessible at
/actuator/configpropsand returns a JSON object withprefix,sources, andpropertiesarrays. - Spring Boot 2.x+ groups configprops under the
configpropsactuator ID, and it can be filtered or secured using Spring Security or role-based access.
What Is configprops in Spring Boot?
configprops is a built-in Spring Boot Actuator endpoint that dumps the entire configuration model—every property that has been bound or could be bound to beans in your application. It reads from Spring's Environment abstraction and surfaces the effective, merged configuration after all profiles, property sources, and precedence rules have been applied.
Think of it as a runtime map of what your application actually sees, not just what is declared in application.yml or application.properties.
The endpoint was one of the earliest Actuator endpoints and predates the more granular env endpoint. While /actuator/env shows raw property sources, /actuator/configprops shows the configuration model—the properties that Spring Boot has already linked to typed beans via @ConfigurationProperties or @Value.
Why Do Developers Need configprops?
Spring Boot resolves configuration from dozens of sources in a specific precedence order. When a property value doesn't behave as expected, guessing the source is nearly impossible. configprops answers three critical questions in one call:
- Is my property bound? Confirms whether a bean's
@ConfigurationPropertiesprefix is resolving correctly. - Which source wins? Shows the effective value after profile overrides, external configs, and command-line arguments are merged.
- What is typed? Reveals whether a property is being interpreted as a
String,int,List,Duration, or another type—and flags binding failures silently.
Without this endpoint, developers typically resort to logging every property manually or adding temporary debug code—both of which require a rebuild and redeploy.
How to Access the configprops Endpoint
Prerequisites
- Spring Boot 2.7+ or Spring Boot 3.x with
spring-boot-starter-actuatoron the classpath. - The application must have
management.endpoints.web.exposure.include=configprops(or*).
Basic curl Request
curl -s http://localhost:8080/actuator/configprops | jq .
Response Structure Overview
The JSON response contains an array of binding contexts. Each context has:
| Field | Description |
|---|---|
context |
The bean definition resource or application context identifier. |
prefix |
The property prefix bound to this configuration bean (e.g., app.customer). |
properties |
An array of individual property entries, each with name, value, and type. |
sources |
A list of property sources where values were resolved (e.g., application.properties, environment variables). |
Filtering by Prefix
You can narrow the output to a specific configuration bean using a query parameter:
curl -s 'http://localhost:8080/actuator/configprops?prefix=app' | jq .
Common Problems and How configprops Solves Them
Problem 1: Property Not Binding to @ConfigurationProperties Bean
Symptom: A property like app.mail.host is set in application.yml, but the bean reads null or the default value.
Diagnosis with configprops: Hit the endpoint and search for the prefix app.mail. If the property appears with an empty value, the binding failed. If it is entirely absent, the prefix is misconfigured or the bean is not annotated with @ConfigurationProperties properly.
Fix checklist:
- [ ] Confirm
@ConfigurationProperties("app.mail")matches the prefix exactly (case-sensitive). - [ ] Ensure the class is registered as a Spring bean (
@Componentor@ConfigurationPropertieson a@Beanmethod). - [ ] Enable annotation processing with
@EnableConfigurationPropertiesif using a@Beandeclaration. - [ ] Verify no typographical error in the YAML key (common:
hostvs.hosst).configpropsreveals the exact bound keys.
Problem 2: Profile Override Not Taking Effect
Symptom: app.debug=true is set in application-dev.yml, but the running application still shows false.
Diagnosis with configprops: Check the sources array for each property. If the active profile is correct but the value comes from application.properties instead of application-dev.properties, the dev profile may not be activated.
Fix: Verify spring.profiles.active=dev is passed via environment variable, JVM argument (-Dspring.profiles.active=dev), or application.yml.
Problem 3: Sensitive Properties Exposed in Logs or Endpoints
Symptom: Database passwords or API keys appear in the configprops JSON response.
Diagnosis with configprops: The endpoint prints all bound values by default, including those masked by spring.cloud.bootstrap.encryption.key or Spring Boot's built-in redaction.
Fix checklist:
- [ ] Add
management.endpoint.configprops.sensitive=true(Spring Boot 2.x) to exclude sensitive entries. - [ ] In Spring Boot 3.x, use
management.endpoint.configprops.include-values=falseto suppress value output entirely. - [ ] Apply
@ConfigurationPropertiesBindingwith a customBindingConverterthat redacts known sensitive names. - [ ] Restrict Actuator endpoint access with Spring Security: permit only
ADMINrole to access/actuator/configprops.
Problem 4: Type Conversion Failures Silent in Production
Symptom: A property meant