I am trying to use reactive repositories with H2
using Spring Boot
.
I have added dependencies
implementation 'org.springframework.boot.experimental:spring-boot-starter-data-r2dbc:0.1.0.M1'
implementation 'org.springframework.boot.experimental:spring-boot-actuator-autoconfigure-r2dbc:0.1.0.M1'
implementation 'io.r2dbc:r2dbc-pool:0.8.0.RELEASE'
My domains looked like this
@Entity
@Table(name = "json_comparison")
public class JsonComparisonResult {
@Column(name = "comparison_id")
@Id
private String comparisonId;
@Column(name = "left")
private String leftSide;
....
When the dependency was to
implementation "org.springframework.boot:spring-boot-starter-data-jpa:$springBootVersion"
Everything worked fine. But since I have added r2dbc
dependencies it wasn't able to find any dependencies for javax.persistence
annotations. When I use starter-jpa
with reactive repositories it fails on startup (regular Reactive Repositories are not supported by JPA
).
How to solve the problem? Add javax.persistence
dependency manually?
What is the problem?