Skip to content

AnnotationSessionFactoryBean packagesToScan does not scan for annotations in package's package-info.java file [SPR-7748] #12404

Closed

Description

@spring-projects-issues

Gabriele Del Prete opened SPR-7748 and commented

If I use the packagesToScan property of AnnotationSessionFactoryBean, classes are scanned for annotations, but the package itself is not scanned (i.e. package-info.java file is not considered).

I guess it would be better to include the package-info.java file too as the "packagesToScan" name really makes one think that it will scan the packages as a whole.

Note also the contrast with the "annotatedPackages" and "annotatedClasses" name, where it's clear that one will only scan the package annotations and the other only the package classes annotation.


Affects: 3.0.4

Issue Links:

Referenced from: commits 5334ac5

Activity

  1. spring-projects-issues commented on Feb 13, 2013

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    As of 3.2.2, "packagesToScan" detects package-info classes as well and passes them to Hibernate's addPackage method. Sorry for not getting back to this issue earlier; it got lost in the waiting-for-triage flood :-(

    Juergen

  2. added this to the 3.2.2 milestone on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions