Skip to content

Kora doesn't add abstract @Repository generated implementations to DI container #158

Closed
mitasov-ra opened this issue Jun 16, 2023 · 0 comments · Fixed by #163
Closed

Kora doesn't add abstract @Repository generated implementations to DI container #158

mitasov-ra opened this issue Jun 16, 2023 · 0 comments · Fixed by #163

Comments

@mitasov-ra
Copy link
Contributor

mitasov-ra commented Jun 16, 2023

This works:

@Repository
public interface FooRepository extends JdbcRepository {

  @Query("""
      SELECT
        name
      FROM foo
      WHERE id = :id
      """)
 Foo findById(Integer id);

}

But this:

@Repository
public abstract class FooRepository implements JdbcRepository {

  @Query("""
      SELECT
        name
      FROM foo
      WHERE id = :id
      """)
 public abstract Foo findById(Integer id);

}

causes the error:

Required dependency was not found and candidate class com.example.FooRepository is not final
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant