Skip to content

Conversation

@linw-bai
Copy link
Contributor

When validating exclusions, prefer the selector's beanClassLoader for ClassUtils.isPresent checks and fall back to the selector class loader if the beanClassLoader is not set. This makes presence checks consistent with the classloader context used for loading auto-configuration candidates.

When validating exclusions, prefer the selector's beanClassLoader for ClassUtils.isPresent checks
and fall back to the selector class loader if the beanClassLoader is not set. This makes presence
checks consistent with the classloader context used for loading auto-configuration candidates.

Signed-off-by: linw-bai <107357009+linw-bai@users.noreply.github.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 14, 2025
@wilkinsona wilkinsona added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 14, 2025
@wilkinsona wilkinsona added this to the 3.5.x milestone Nov 14, 2025
@wilkinsona wilkinsona changed the title Use beanClassLoader when checking excluded auto-configuration classes Auto-configuration exclusions are checked using a different class loader to the one that loads auto-configuration classes Nov 14, 2025
@snicoll snicoll self-assigned this Nov 14, 2025
@snicoll snicoll modified the milestones: 3.5.x, 3.5.8 Nov 14, 2025
snicoll pushed a commit that referenced this pull request Nov 14, 2025
When validating exclusions, prefer the selector's beanClassLoader for
ClassUtils.isPresent checks and fall back to the selector class loader
if the beanClassLoader is not set.

This makes presence checks consistent with the classloader context used
for loading auto-configuration candidates.

See gh-48129

Signed-off-by: linw-bai <107357009+linw-bai@users.noreply.github.com>
@snicoll snicoll closed this in a772242 Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants