See https://github.com/spring-projects/spring-boot/issues/44701 for background.
We could introduce new attribute like referenceKey
for @DefaultValue
@DefautValue(referenceKey = "spring.sql.init.mode")
private DatabaseInitializationMode initializeSchema = DatabaseInitializationMode.EMBEDDED;
initializeSchema
will be the initial value of field( here isEMBEDDED
) or value of@DefaultValue
(for constructor parameter) if bothspring.sql.init.mode
andspring.batch.jdbc.initialize-schema
are missinginitializeSchema
will be bound tospring.sql.init.mode
ifspring.batch.jdbc.initialize-schema
is missinginitializeSchema
will always be bound tospring.batch.jdbc.initialize-schema
if it's present