-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use bean factory class loader for deserializing JDBC sessions #610
Conversation
* {@link ConversionService}. Applicable only with Spring 4.2.1 or later. | ||
* @param classLoader the bean class loader | ||
*/ | ||
public void setClassLoader(ClassLoader classLoader) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User's might be a bit surprised to find out if the manually invoke setConversionService
and then setClassLoader
that the ConversionService
is overridden.
Perhaps a better approach could be to remove the setClassLoader
method and have the configuration class create a default ConversionService
with the appropriate ClassLoader
if the user has not explicitly provided one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed @rwinch, that scenario came across my mind today as well.
This commit addresses the issue with deserializing JDBC sessions in Spring Boot applications that use DevTools. Previously, such configuration would cause `ClassCastException` when deserializing JDBC sessions due to app class loader being used instead of restart class loader.
abf2ddd
to
71a7549
Compare
@rwinch I've updated the PR as per your suggestions. |
This commit addresses the issue with deserializing JDBC sessions in Spring Boot applications that use DevTools. Previously, such configuration would cause `ClassCastException` when deserializing JDBC sessions due to app class loader being used instead of restart class loader. Fixes gh-610
This commit addresses the issue with deserializing JDBC sessions in Spring Boot applications that use DevTools. Previously, such configuration would cause
ClassCastException
when deserializing JDBC sessions due to app class loader being used instead of restart class loader.See spring-projects/spring-boot#3805 for more background.