Skip to content

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

Description

@machimedes

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();
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions