Description
Keith Donald opened SPR-6745 and commented
This means annotation-driven type conversion does not work when binding to JavaBean properties with SpEL. This can be worked around by defining annotations on the method parameter of a setter method, and the return value of a getter, but is not ideal.
SpEL should be consistent with BeanWrapper with its TypeDescriptor configuration when getting and setting JavaBean properties. This likely means use of a BeanTypeDescriptor in those cases.
This was noticed when attempting to use a SpEL-based data mapper to map String fields in a Map to a JavaBean, where annotation-driven parsing rules were specified on JavaBean fields. This works fine with a BeanWrapper since the BeanTypeDescriptor exposes annotations from the field, getter, and setter. Unfortunately, SpEl just uses the default TypeDescriptor in these cases which only exposes parameter annotations.
Affects: 3.0 GA
Issue Links:
- Allow SpEl expressions to be evaluated from JSPs [SPR-6827] #11493 Allow SpEl expressions to be evaluated from JSPs ("is depended on by")
- Create a Unified EL implementation with Spring EL [SPR-6080] #10748 Create a Unified EL implementation with Spring EL
Referenced from: commits 117b138