Skip to content

Improve OnClassCondition report to only mention the condition that has been configured #11086

@martinlippert

Description

@martinlippert

I have this class:

@Component
@ConditionalOnClass(name="java.lang.String")
public class MyConditionalComponent {
}

and the auto-config report for this looks like:

       "MyConditionalComponent": [
            {
                "condition": "OnClassCondition",
                "message": "@ConditionalOnClass found required class 'java.lang.String'; @ConditionalOnMissingClass did not find unwanted class"
            }
        ]

why does the @ConditionalOnMissingClass message appears?
And it seems to append the same message quite often for conditionals. Any idea why that happens?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions