Skip to content

Fix Kotlin example for @ComponentScan basePackages attribute #28628

@maxbiu

Description

@maxbiu

https://docs.spring.io/spring-framework/docs/current/reference/html/core.html#beans-scanning-filters

kotlin to:

@Configuration
@ComponentScan(basePackages = ["org.example"],
        includeFilters = [Filter(type = FilterType.REGEX, pattern = [".*Stub.*Repository"])],
        excludeFilters = [Filter(Repository::class)])
class AppConfig {
    // ...
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions