Name R2dbcEntityTemplate explicitly
See original GitHub issueI believe this isn’t fully supported yet but attempting to use r2dbc DSL with repositories, pretty close but I believe it wants the R2dbcEntityTemplate bean named “r2dbcEntityTemplate” explicitly:
19:31:29.421 [restartedMain] WARN o.s.b.w.r.c.AnnotationConfigReactiveWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contractLifecycleRepository' defined in com.xxx.ContractLifecycleRepository defined in @EnableR2dbcRepositories declared on R2dbcRepositoriesAutoConfigureRegistrar.EnableR2dbcRepositoriesConfiguration: Cannot resolve reference to bean 'r2dbcEntityTemplate' while setting bean property 'entityOperations'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'r2dbcEntityTemplate' available
When creating the beans manually in lieu of using r2dbc
DSL I run into the same problem and it’s resolved by naming it explicitly:
bean<R2dbcEntityTemplate>("r2dbcEntityTemplate") {
ref<R2dbcDataAutoConfiguration>().r2dbcEntityTemplate(ref())
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Spring Data R2DBC - Reference Documentation
The version name follows ${calver} for GA releases and service releases and the ... so this repository clearly belongs to Spring Data JPA....
Read more >spring-projects/spring-data - Gitter
I have a @ManyToOne relationship between CarModel and EngineType in my code. I have written a native query to fetch the data since...
Read more >java - How do I handle nullable fields using either the Mono ...
R2DBC and Spring Data R2DBC make null handling explicit by requiring either binding a value to your Statement or binding a null ....
Read more >Spring Data R2DBC CRUD Example - Vinsguru
Here we clearly assume that for any new product, id would be null to ... R2dbcEntityTemplate.lambda$update$5(R2dbcEntityTemplate.java:402) ...
Read more >Spring Data R2DBC [PostgreSQL] - Medium
As inferred from its name, it's an implementation of ... Basically using a R2dbcEntityTemplate, queries would be delegated to DatabaseClient discussed ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
After testing the naming is required indeed.
@sdeleuze What do you think about naming the
R2dbcEntityTemplate
created bydataR2dbc
since it seems that other parts depends on it by bean naming convention ?In the mean time this configuration seems to be working With this configuration the application boot :
when I use my forked
spring-fu
:it works.