Is it possible to connect DB in Spring Boot and Spring Data JPA without third party JPA provider - spring-boot

I need to connect a Oracle 12c DB and query a table and fetch the results.I am using Spring Boot 1.2.4.Now if I use Spring Data Jpa will it suffice this requirement or Do I need to use JPA provider like Hibernate or Open JPA is a must along with Spring Data JPA.
Is there any examples which use only Spring Data JPA without any third party JPA provider?

Related

Spring JPA integration with DynamoDB possible?

I have implemented code Spring JPA + Hbase, now I wanted to replace HBase with DynamoDB.
I was thinking to integrate jpa with dynamoDB but question was is Spring JPA will support DynamoDB integration directly ? please share you views.

Spring boot oracle database without hibernate?

i managed to connect my spring boot application with postgres without hibernate, but with r2dbc for a reactive application.
I was wondering if i can connect spring boot to oracle database without hibernate for a non reactive application ?
Spring Data provides two basic modules for integrating applications with relational databases. Spring Data JDBC is for imperative applications while Spring Data R2DBC is for reactive ones. They both use the same interfaces and patterns. If you're familiar with Spring Data R2DBC, it will be straightforward to work with Spring Data JDBC.

is it possible to connect to two databases one with spring jpa and another with spring jdbc

I have a requirement to connect to two databases using spring boot. I can able to connect to two different databases using spring jpa, but I want to connect two databases one with spring jpa and another with spring jdbc
I got the solution. I missed to add ComponentScan for JDBC connection configuration and removed #Primary annotation

Spring-boot JPA connect to postgres where database and schema are provided at runtime

I am building a multi-tenant application, where the tenant database configuration are stored in Redis. Based on the request, I will query the Redis to get the database and schema configured for that tenant, this application is built on spring boot.
I took a look at spring boot's JPA sample, and did some more google to find a suitable solution for this, unfortunately, I couldn't find one.
Is this really possible to use JPA sample provided here ?
https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples/spring-boot-sample-data-jpa
Please suggest me any other best possible way to tackle this problem
Thanks
Spring Data JPA uses JPA annotations to define domain model. These JPA entities define schema for your database. Obviously you can't change these entities, nor DB schema on runtime.
So no, updating schema on runtime is not possible with Spring Boot + Spring Data JPA combo.
Database connection (e.g. DB URL, username password) could be more flexible. You would need to create DataSource beans programmatically and somehow programatically define which data source to use for each query per tenant. But this wasn't requirement of Spring nor JPA ecosystem, therefore you may face lot of issues.
I was working on such system before, but we were using plain SQL queries via JDBC and were creating DB connection programatically to achieve schema changes on runtime.

#Version not working with spring data jpa, Hibernate and Db2

Spring Data JPA with DB2 doesn't working. I am using org.springframework.data.annotation.Version; as a version annotation.

Resources