Skip to content
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

Ensure compatibility with previous version of spring data #2627

Merged
merged 1 commit into from
Jun 15, 2024

Conversation

EvaristeGalois11
Copy link
Contributor

First of all, thank you very much for accepting my previous contribution :D

This is a follow up to #2626

I saw that you did some changes to it, in particular moving the bean declaration from a dedicated configuration class to the already present SpringDocPageableConfiguration.

This sadly breaks compatibility with spring data < 3.3.0 because without the @ConditionalOnClass(PagedModel.class) as a safeguard the @ConditionalOnBean alone isn't safe to use and a ClassNotFoundException is thrown when the class isn't on the classpath.

I tweaked a bit the bean declaration to make sure that it doesn't break anymore if SpringDataWebSettings isn't present.

@bnasslahsen
Copy link
Contributor

bnasslahsen commented Jun 15, 2024

@EvaristeGalois11,

Did you test your proposed fix, with previous versions of spring data < 3.3.0 ?

@EvaristeGalois11
Copy link
Contributor Author

@bnasslahsen Yep

I pushed the project I'm using to do some tests, it's a bit rough but if you want to double check it should be fine

Here it is https:/EvaristeGalois11/paged-model-swagger

@bnasslahsen bnasslahsen merged commit beb3c66 into springdoc:main Jun 15, 2024
@bnasslahsen
Copy link
Contributor

Thank you @EvaristeGalois11 - the fix looks good!
It's now merged.

@EvaristeGalois11 EvaristeGalois11 deleted the page-serialization-fix branch June 15, 2024 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants