Skip to content

@JdbcTest is not injecting JdbcClient #37114

@sivaprasadreddy

Description

@sivaprasadreddy

I am exploring JdbcClient API and realized while writing tests using @JdbcTest I am not able to inject JdbcClient.
I had to explicitly add @ImportAutoConfiguration(JdbcClientAutoConfiguration.class) to be able to inject JdbcClient.

Reproducer: https://github.com/sivaprasadreddy/spring-boot-tutorials-blog-series/blob/main/spring-boot-jdbcclient-tutorial/src/test/java/com/sivalabs/bookmarks/domain/BookmarkRepositoryTest.java

Expected: While using @JdbcTest I should be able to inject JdbcClient just like JdbcTemplate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions