Document configuration properties completely

Configuration properties should be fully documented with clear descriptions, explicit default values, and proper metadata. This helps users understand and configure the application correctly.

copy reviewer prompt

Prompt

Reviewer Prompt

Configuration properties should be fully documented with clear descriptions, explicit default values, and proper metadata. This helps users understand and configure the application correctly.

Key requirements:

  • Provide explicit default values in the property definition
  • Include short, simple property descriptions without Javadoc tags
  • Add enum defaults to additional-spring-configuration-metadata.json
  • Use consistent property naming within property groups

Example:

@ConfigurationProperties("spring.example")
public class ExampleProperties {
    /**
     * Maximum number of connections to create.
     */
    private int maxConnections = 100;
    
    /**
     * Connection timeout duration.
     */
    private Duration timeout = Duration.ofSeconds(30);
    
    // Getters/setters
}

For enums:

{
  "properties": [
    {
      "name": "spring.example.mode",
      "defaultValue": "auto"
    }
  ]
}

Source discussions