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

ClassPathMapperScanner scan annotations in the package path as CandidateComponent. #1032

Open
machimedes opened this issue Nov 13, 2024 · 0 comments

Comments

@machimedes
Copy link

machimedes commented Nov 13, 2024

I found ClassPathMapperScanner may scan annotations in the package path as CandidateComponent,
but CandidateComponent should not include annotation type.(Am I right?)

File: src/main/java/org/mybatis/spring/mapper/ClassPathMapperScanner.java.

Method isCandidateComponent of ClassPathMapperScanner should exclude annotation bean definition.

    protected boolean isCandidateComponent(AnnotatedBeanDefinition beanDefinition) {
        return beanDefinition.getMetadata().isInterface() && beanDefinition.getMetadata().isIndependent()
            && !beanDefinition.getMetadata().isAnnotation();
    }
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

No branches or pull requests

1 participant