Skip to content

@Repository generated components are not recognised by graph if their indirect parents are requested #167

@mitasov-ra

Description

@mitasov-ra

Assume I have the following class hierarchy:

interface FooRepository { ... }

@Repository
abstract class AbstractFooRepository( ... ) : FooRepository, JdbcRepository { ... }

@Generated
class `$AbstractFooRepository_Impl`( ... ) : AbstractFooRepository( ... ) {
  ...
}

If I then create the new component:

@Component
class FooService(val repo: FooRepository)

I get the following error:

Required dependency type FooRepository was not found and can't be autocreated.

But if I change repo type from FooRepository to AbstractFooRepository everything compiles just fine

Metadata

Metadata

Assignees

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