Add ability to amend trusted classes in Jackson2ExecutionContextStringSerializer#3787
Conversation
…gSerializer This commit adds the ability to specify additional trusted classes without having to provide a custom object mapper. Issue spring-projects#3765
|
This looks like it solves it for me. It's still not very easy to replace the service itself ( |
|
@benas Seems this change is not binary compatible with client compiled against |
|
@nstdio This enhancement/feature has not been backported to 4.2.x, even though my initial comment implies it. We typically backport bug fixes only to patch releases of previous supported lines (4.2.x is approaching its EOL anyway). Anything preventing you from upgrading to 4.3? |
|
@benas Thanks for your response. Great work! We already upgraded to The issue was that internal library was compiled against |
|
Hello @benas! thank you for the effort putting this so far, I would like to ask, how is that possible to return a customized Jackson2ExecutionContextStringSerializer, and this Serializer will be used in default spring-batch configuration? Until now we don't have explicit configuration for JobRepository and maybe others related classes (Beans). For example would below code would work? If it would be not possible the which classes (JobExplorer, JobRepository ?) should I explicitly create. Do you have an example how to just only overwrite Jackson2ExecutionContextStringSerializer, but leave everything else (i.e. JobExplorer, JobRepository) with least changes as possible? Kind regards |
|
@dthng You need to provide a custom |
This PR is for #3765. It adds the ability to specify additional trusted classes (at construction time of the
Jackson2ExecutionContextStringSerializer) without having to provide a custom object mapper.The usage of varargs in the constructor of
Jackson2ExecutionContextStringSerializermakes the change backward compatible with 4.2.