Description of the Issue
In the Spring Security documentation, the following sentence appears incorrect due to a missing conditional "if":
"The auto-configuration of a UserDetailsService will also back off any of the following Spring Security modules is on the classpath:"
This sentence is misleading as it suggests that the UserDetailsService
auto-configuration will actively "back off" those modules, which is not the intended behavior.
Suggested Correction
The corrected sentence should be:
"The auto-configuration of a UserDetailsService will also back off if any of the following Spring Security modules is on the classpath:"
Why is this Correction Necessary?
- Grammar & Clarity: The missing "if" makes the sentence grammatically incorrect and harder to understand.
- Technical Accuracy: Without "if," it implies that
UserDetailsService
actively disables other modules, while the correct behavior is thatUserDetailsService
auto-configuration is skipped when those modules are present.
Steps to Reproduce:
- Visit the [Spring Security documentation](https://docs.spring.io/spring-security/reference/index.html) (or the specific file in the GitHub repository).
- Locate the section discussing
UserDetailsService
auto-configuration. - Observe the incorrect sentence structure.
Proposed Fix:
Update the documentation to include the missing "if" for better clarity and correctness.
Would appreciate your confirmation and update on this!
Comment From: wilkinsona
Thanks for spotting this. I assume you're referring to this phrase in this section of Spring Boot's documentation:
The auto-configuration of a UserDetailsService will also back off any of the following Spring Security modules is on the classpath
I think we should add "when". This will align with the similar phrase in the immediately following section on WebFlux security:
The auto-configuration will also back off when any of the following Spring Security modules is on the classpath
Comment From: Saaiiikrishna
Thank you for reviewing my issue and for pointing out the consistency with the WebFlux security section. Yes, I was referring to that phrase in the Spring Boot documentation.
Adding "when" instead of "if" makes sense and aligns better with the phrasing used in the WebFlux security section:
"The auto-configuration will also back off when any of the following Spring Security modules is on the classpath."
This correction improves clarity and ensures consistency across the documentation. I appreciate your consideration, and I look forward to seeing the update.
Comment From: wilkinsona
Closing in favour of #44267.