configuration-properties/ @ConfigurationProperties vs @Value on Spring Boot 4.1.1. The relaxed-binding matrix is generated by binding each spelling rather than transcribed, and re-checked against real processes -- the in-process probe was wrong twice before it was right. Records the three findings that came out of it: @Value does get relaxed resolution inside Spring Boot (Boot attaches ConfigurationPropertySources), the configuration processor silently stops generating metadata on JDK 23+ when declared as a plain dependency, and @Valid is not what makes nested constraints run. profiles-and-config/ Precedence, profiles, spring.config.import and config trees. /precedence reports every source holding a property in rank order with file and line, which turns "my profile file had no effect" into a two-line answer. Also pins the counterintuitive one: an imported file outranks the file that imported it. spring-aop/ Designators, proxy types, and aspects that do not fire. One advice per supported designator so the reference table is generated from real matches; all fourteen unsupported designators fed to the parser. Two corrections to the reference documentation: unsupported designators throw UnsupportedPointcutPrimitiveException (extends RuntimeException, not IllegalArgumentException), and spring-boot-starter-aop was renamed to spring-boot-starter-aspectj in Boot 4. 19 contract tests across the three modules, 15 captured transcripts, all regenerated by scripts/run-all.sh. Verified on Spring Boot 4.1.1, Spring Framework 7.0.9, JDK 25.0.4.1. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gip4srpzMwjgoba6uEfbr5
69 lines
2.6 KiB
Plaintext
69 lines
2.6 KiB
Plaintext
== is the annotation processor discovered? ==
|
|
|
|
openjdk version "25.0.4.1" 2026-08-18 LTS
|
|
processor jar: spring-boot-configuration-processor-4.1.1.jar
|
|
|
|
A) processor on the classpath, javac defaults -- what an <optional> dependency gives you
|
|
$ javac -cp <deps>:spring-boot-configuration-processor.jar -d a $SOURCES
|
|
spring-configuration-metadata.json files produced: 0
|
|
|
|
B) identical, plus -proc:full
|
|
$ javac -proc:full -cp <deps>:spring-boot-configuration-processor.jar -d b $SOURCES
|
|
spring-configuration-metadata.json files produced: 1
|
|
|
|
Both compilations succeed. Only one of them has metadata.
|
|
|
|
== what this project's pom does instead ==
|
|
The processor is declared as an <annotationProcessorPath> on maven-compiler-plugin,
|
|
which puts it on javac's --processor-path where discovery is not disabled:
|
|
|
|
$ mvn clean package && ls target/classes/META-INF/
|
|
spring-configuration-metadata.json
|
|
|
|
== the generated metadata, first entries ==
|
|
{
|
|
"groups": [
|
|
{
|
|
"name": "demo.mail",
|
|
"type": "com.ankurm.configprops.props.MailProperties",
|
|
"sourceType": "com.ankurm.configprops.props.MailProperties"
|
|
},
|
|
{
|
|
"name": "demo.mail.retries",
|
|
"type": "com.ankurm.configprops.props.MailProperties$RetryProperties",
|
|
"sourceType": "com.ankurm.configprops.props.MailProperties",
|
|
"sourceMethod": "retries()"
|
|
},
|
|
{
|
|
"name": "demo.relaxed",
|
|
"type": "com.ankurm.configprops.props.RelaxedProperties",
|
|
"sourceType": "com.ankurm.configprops.props.RelaxedProperties"
|
|
},
|
|
{
|
|
"name": "demo.validated",
|
|
"type": "com.ankurm.configprops.props.ValidatedProperties",
|
|
"sourceType": "com.ankurm.configprops.props.ValidatedProperties"
|
|
},
|
|
{
|
|
"name": "demo.validated.pool",
|
|
"type": "com.ankurm.configprops.props.ValidatedProperties$Pool",
|
|
"sourceType": "com.ankurm.configprops.props.ValidatedProperties",
|
|
"sourceMethod": "pool()"
|
|
}
|
|
],
|
|
"properties": [
|
|
{
|
|
"name": "demo.mail.headers",
|
|
"type": "java.util.Map<java.lang.String,java.lang.String>",
|
|
"description": "Bound from arbitrary sub-keys under {@code demo.mail.headers.*}.",
|
|
"sourceType": "com.ankurm.configprops.props.MailProperties"
|
|
},
|
|
{
|
|
"name": "demo.mail.host",
|
|
"type": "java.lang.String",
|
|
"description": "SMTP host. No default: absent means the application must not start.",
|
|
"sourceType": "com.ankurm.configprops.props.MailProperties"
|
|
},
|
|
{
|
|
"name": "demo.mail.port",
|