Skip to content

Conversation

@yujuncai
Copy link
Owner

This commit migrates the data access layer from Spring Data JPA to Spring Data R2DBC and Hibernate Reactive.

Changes include:

  • Updated pom.xml to include R2DBC, r2dbc-mysql, and Hibernate Reactive dependencies and remove JPA dependencies.
  • Reconfigured application.yaml for R2DBC connection.
  • User entity remains largely the same, compatible with Hibernate Reactive.
  • UserRepository refactored to extend ReactiveCrudRepository, with methods returning Mono/Flux.
  • SqlController and AuthController updated to use the reactive UserRepository, removing blocking calls and Schedulers.boundedElastic().
  • SecurityAppApplication updated with @EnableR2dbcRepositories.

Testing:

  • SecurityAppApplicationTests (context load) is PASSING.
  • SqlControllerTest (with mocked UserRepository) is PASSING.
  • UserRepositoryTest encountered persistent context configuration issues and is NOT reliably passing. Further work is needed for these specific repository tests.

This commit migrates the data access layer from Spring Data JPA to Spring Data R2DBC and Hibernate Reactive.

Changes include:
- Updated pom.xml to include R2DBC, r2dbc-mysql, and Hibernate Reactive dependencies and remove JPA dependencies.
- Reconfigured application.yaml for R2DBC connection.
- User entity remains largely the same, compatible with Hibernate Reactive.
- UserRepository refactored to extend ReactiveCrudRepository, with methods returning Mono/Flux.
- SqlController and AuthController updated to use the reactive UserRepository, removing blocking calls and Schedulers.boundedElastic().
- SecurityAppApplication updated with @EnableR2dbcRepositories.

Testing:
- SecurityAppApplicationTests (context load) is PASSING.
- SqlControllerTest (with mocked UserRepository) is PASSING.
- UserRepositoryTest encountered persistent context configuration issues and is NOT reliably passing. Further work is needed for these specific repository tests.
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

Successfully merging this pull request may close these issues.

2 participants