Enhance configuration properties handling and update README#142
Merged
mercyblitz merged 12 commits intoJun 29, 2026
Conversation
Move the missing `ConfigurationPropertiesBeanContext` warning into `getConfigurationPropertiesBeanContext(...)` and add a null guard before `setProperty(...)` in `onFinish(...)`. This prevents potential NPEs when context creation returns null while keeping warning logs emitted from a single place.
Refresh the documented latest release versions for the `main` and `1.x` branches so the compatibility table matches the current published artifacts.
Reworks configuration properties bean context initialization to build contexts from bean definitions up front, track beans by name, and initialize property snapshots once singleton binding is complete. It also improves property value comparison by cloning/resolving bound values, handling constructor-bound beans more safely, and lazily resolving bean property names for clearer change events.
Use `RootBeanDefinition` with the shared `getResolvableType` helper when scanning configuration properties beans. This avoids relying on the generic bean definition API for merged definitions and makes bean type detection more reliable.
Add a compatible `org.springframework.boot.context.properties.ConstructorBinding` annotation in the compatibility module, and update configuration-properties tests to exercise constructor-bound beans with explicit constructor annotation and accessor methods. The listener test now also verifies `TestConstructorBindingConfigurationProperties` values, and an unused `isConstructorBindingBean()` helper was removed from `ConfigurationPropertiesBeanContext`.
Update `BindUtilsTest` to remove Spring Boot version-dependent expectations when checking `getBindConstructor` for `TestConstructorBindingConfigurationProperties`. The test now consistently asserts `null` in both cases, and drops the no-longer-used version and `assertEquals` imports.
Codecov Report❌ Patch coverage is
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
Adjust `bindPropertyValues()` to branch on `bindConstructor`: keep per-property binding for regular beans, but call `initBeanProperties()` when constructor binding is in use. This avoids applying field-style binding in constructor-bound scenarios and ensures properties are initialized through the constructor path.
Updates the Maven parent POM version in `pom.xml` from `0.3.4` to `0.3.5` to align this project with the latest microsphere-build configuration and dependency management.
Add a unit test covering `newConfigurationPropertiesBeanProperty` when given a `Bindable` created from an instance and no matching bean property metadata. This verifies the method returns `null` for that edge case.
Update the parent POM to use microsphere-spring 0.1.33.
Use the cached bind constructor when initializing bean properties, and reduce noisy property update logging from INFO to TRACE. The change also makes the trace output wording more consistent by referring to "Bean Property" throughout.
c8a2e10
into
microsphere-projects:release-1.x
36 of 37 checks passed
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This pull request refactors and enhances the
ConfigurationPropertiesBeanContextclass, improving its encapsulation, property binding, and bean management. The changes introduce new utility methods, improve property value handling, and update the way beans and their properties are initialized and accessed. Additionally, the documentation is updated to reflect the latest versions.Enhancements to
ConfigurationPropertiesBeanContext:beanName,getBeanName(),getBeanType(),isConstructorBindingBean(),getPrefix(), andgetBeanClass(). [1] [2]bindPropertyValues,bindPropertyValue), improving support for property updates.Code cleanup and imports:
Documentation updates:
README.mdto reflect the latest released versions for bothmainand1.xbranches.