Skip to content

Conversation

@tangyang9464
Copy link
Contributor

@tangyang9464 tangyang9464 commented Jun 19, 2025

Change Summary

This PR add the @MappingSource annotation, providing fine-grained control over source parameter behavior, addressing the following key issues:

  1. Implicit Mapping Control (@MappingSource(implicitMapping=true/false))

    • Allows controlling whether Bean/Collection parameter properties are automatically expanded for implicit mapping (close 2559)
    • Provides control over Map parameter auto-expansion in multi-source mapping scenarios (close 2549 , close 2764, close 3697, close 3793)
  2. Primary Parameter Marking (@MappingSource(primary=true/false))

    • Introduces a primary flag to resolve property conflicts in multi-source mappings (close 3161)
    • When multiple source parameters have properties with the same name, prioritizes the parameter marked as primary
  3. Context Parameter Enhancement

    • Allows @Context parameters to be simultaneously marked as source parameters by adding @MappingSource (close 3665)
    • Provides support for multiple roles of the same parameter in the mapping process

@filiphr plz review

Yang and others added 3 commits June 18, 2025 00:05
Support:
1. enabling Map-to-Bean implicit mapping in multi-source
2.disabling implicit mapping for bean
… as primary parameters and handling conflicts in multi-source mapping

- Add primary attribute to mark primary parameters and resolve attribute conflicts in multi-source mapping.

Signed-off-by: Yang Tang <tangyang9464@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment