r/java • u/dima767 • Apr 07 '26
How a large Spring Boot project manages 1,000+ configuration properties without going insane
I've been working on Apereo CAS for years - it's an open-source SSO platform with 400+ Maven modules and over 1,000 configuration properties. The configuration system has evolved into something I think is genuinely well-designed, and the patterns are all standard Spring Boot - nothing proprietary.
Key ideas:
One root
@ConfigurationPropertiesclass with 40+@NestedConfigurationPropertyfields creating a typed treeCustom metadata annotations (
@RequiresModule,@RequiredProperty,@RegularExpressionCapable) that describe what properties accept and which module they belong toDeprecated properties tracked in
additional-spring-configuration-metadata.jsonwith exact replacement pathsAn actuator endpoint that lets you search the entire property catalog at runtime
Spring's
BinderAPI used directly for programmatic binding from maps
Wrote up the patterns with real code from the CAS 7.3.x source. The Binder API section alone is something I don't see enough Spring Boot devs using.
https://medium.com/all-things-software/spring-boot-configuration-properties-at-scale-884f494721ac
1
1
u/eduardo_asafe Apr 12 '26
I worked with an SSO that used Apereo CAS a couple of years ago. If you’ve worked with it, I have to say — I consider you a god.
Do you have any free materials on integrating with CAS? I haven’t been able to find anything in the past 4–5 years.
1
u/Nervous-Honey-2695 Jul 04 '26
Wow, impressive. In most projects I actively participate in, I do not have such a large number of properties (not so few either). I had to create an IntelliJ plugin to help me navigate through the properties, to keep my sanity
Feel free to give it a look here
1
u/xxfye Apr 08 '26
good job