[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DatabaseConfig not working without @Bean annotation #1

Closed
jerryOkafor opened this issue Apr 2, 2021 · 1 comment
Closed

DatabaseConfig not working without @Bean annotation #1

jerryOkafor opened this issue Apr 2, 2021 · 1 comment

Comments

@jerryOkafor
Copy link
jerryOkafor commented Apr 2, 2021

after hrs of troubleshooting, I figure out that without @bean annotation, spring is not able to pick the Config. Also refer to the example in this link.
https://www.baeldung.com/spring-data-r2dbc

@Bean
override fun connectionFactory(): ConnectionFactory {
        return PostgresqlConnectionFactory(
                PostgresqlConnectionConfiguration.builder()
                        .host("localhost")
                        .database("test")
                        .username("user")
                        .password("password")
                        .build()
        )
    }
@hantsy
Copy link
Owner
hantsy commented Apr 2, 2021

This repository is to experience the Kotlin Coroutine features.

The Spring Data R2dbc in this project is based on an older version. Spring Data R2dbc 1.2 introduced plenty of breaking changes. If you like to explore the newest Spring Data R2dbc features since 1.2(included in Spring Boot 2.4), please go to https://github.com/hantsy/spring-r2dbc-sample.

@hantsy hantsy closed this as completed Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants