Category "spring-data-jpa"

When does the hibernate session gets closed

I have created the following entities. @Entity public class Student { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id;

Can't Autowire @Repository annotated interface in Spring Boot

I'm developing a spring boot application and I'm running into an issue here. I'm trying to inject a @Repository annotated interface and it doesn't seem to work

How do I update an entity using spring-data-jpa?

Well the question pretty much says everything. Using JPARepository how do I update an entity? JPARepository has only a save method, which does not tell me if i

Possibly consider using a shorter maxLifetime value - hikari connection pool spring boot

After starting my SpringBoot application, getting an exception on few minutes of the server startup. Did not use any HikariPool Configuration externally, Spring

JPA Repository.findById() returns null but the value is exist on db

I'm developing Spring boot project, using JPA. What I wanna know is repository.findById(id) method returns null, whereas data is available in the DB. Functions

How to set default current date in jpa for mysql

I am trying to generate current date automatically but getting this error You have an error in your SQL syntax; check the manual that corresponds to your MySQL

Postman returns null when using POST (Spring Boot)

** Update Updated the input in Postman: { "firstName": "Thierry", "lastName": "Blossom", "dateOfBirth": "1981-01-20", "email": "thierry@gmai

Composite Primary Key using MongoDB and Spring Data JPA

Could someone tell how to create a composite key in Spring Data JPA using Mongo DB