Skip to content

Documentation about include/exclude filters describes the inverse behavior #2969

Closed
@krishu1501

Description

@krishu1501

In the official documentation, Section 4.5.3. Using Filters, the last line has an error :
https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#repositories.using-filters

The preceding example excludes all interfaces ending in SomeRepository from being instantiated and includes those ending with SomeOtherRepository.

Instead it will be vice versa as per the given example in the section. It will exclude all those ending with SomeOtherRepository and include those ending with SomeRepository

@EnableJpaRepositories(basePackages = "com.acme.repositories",
includeFilters = { @Filter(type = FilterType.REGEX, pattern = ".*SomeRepository") }, excludeFilters = { @Filter(type = FilterType.REGEX, pattern = ".*SomeOtherRepository") })

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions