Improve documentation to describe how @EntityScan
and @Enable…Repositories
can be used to tune scanning
#36282
Labels
type: documentation
A documentation update
Milestone
In Spring Boot about JPA and Spring Data JPA, exists in the current reference documentation the JPA and Spring Data JPA section, where it has two sub-sections as follows:
These 2 sections have the following content respectively:
and
For Spring Boot 3.1.1 working with Spring Data JPA the
@EntityScan
and@EnableJpaRepositories
annotations are not necessary to be declared explicitly, only if the packages where the Entities and Repositories are defined, reside within the package containing the main configuration class. I think it should be declared explicitly for each documentation section, according the respective annotation.Of course, if any of these types (Entities or Repositories) are defined in a package different of the package containing the main configuration class then the respective annotation is mandatory to be declared. Other scenario would be if for
@EnableJpaRepositories
is need it define some extra configuration, it such as repositoryImplementationPostfixTherefore an expansion about when to declare or not these annotations to the current Reference Documentation would be valuable.
Thanks for your understanding
The text was updated successfully, but these errors were encountered: