Category "spring-data"

spring data extension for quarkus datasource name

I want to use the spring data repositories in my quarkus application with jpa. As long as I use the default datasource and no named persistence unit, I'm able t

Spring boot + Kotlin + MongoDb: Cannot resolve reference to bean 'mongoTemplate' while setting bean property

I am trying to make a simple application using kotlin and spring boot which connects to mongodb and makes some operations there, however I am facing this issues

Error creating bean with name 'mongoTemplate' defined in class path resource Mongobee

Using the Mongobee for Data Migration creating and error as Error creating bean with name 'mongoTemplate' defined in class path resource Migration configuration

Is it possible to use data.sql without schema.sql

I want to initialise schema using spring.jpa.generate-ddl=true and then populate using data.sql. I tried it but it doesn't seem to work without schema.sql. Any

how to make findby with composite key in spring data - jpa -hibernate ? @EmbeddedId

@Embeddable public class AccountTransactionId implements Serializable { private String trxDate; private String acctNo; private int trxNo; } @Entity

com.fasterxml.jackson.databind.exc.InvalidDefinitionException for some REST operations on User entity

I have a few entities: User, Role, Privilege. And for all three entities, I have three operations which are then exposed as REST api. findOne(), findAll(), and

com.fasterxml.jackson.databind.exc.InvalidDefinitionException for some REST operations on User entity

I have a few entities: User, Role, Privilege. And for all three entities, I have three operations which are then exposed as REST api. findOne(), findAll(), and

Spring data: DeleteAll and Insert in same transaction

I am trying to achieve below native query logic using hibernate (Spring JPA). But save(Iterable) throws exception and rollback the entire transaction if one of

Spring Data: can I create a method in the @Repository with a name what return list of object if String equals to constant?

Guess easier if I show you my example: @Entity class User { Long id; Status status; } enum Status { NEW("N"), DELETED("D") } I have an AttributeCon

Spring data cassandra (v3.3.1): how to add codec?

I use spring-data-cassandra:3.3.1 and try to apply TimestampCodec. Documentation says that all codecs should be added through CodecRegistry, but says nothing ab

How to map Elasticsearch Spring Data AggregationsContainer contents to custom model?

I am using Elsaticsearch Spring Data. I have a custom repository that uses ElasticsearchOperations based on examples on docs. I need some aggregation query resu

Integration Eclipse Collections with Spring Data JPA

is it possible integration eclipse collections with spring data jpa + hibernate? for example: import org.springframework.data.jpa.repository.JpaRepository; im

Is it problematic that Spring Data REST exposes entities via REST resources without using DTOs?

In my limited experience, I've been told repeatedly that you should not pass around entities to the front end or via rest, but instead to use a DTO. Doesn't Sp

Hibernate prevent locking of records when updating

I have a long process that run on every user in my database and updates the score and hits fields, while this is running, sometimes a user tries to update his n

Cannot access org.springframework.data from my Java Classes

I'm working on an online tutorial, and in the step where I need to work with databases and add jpa, I cannot access it in my project. I have successfully put t

How apply pagination in reactive Spring Data?

In Spring Data, we have PagingAndSortingRepository which inherits from CrudRepository. In reactive Spring Data, we only have ReactiveSortingRepository which in

Spring. Registering Aspect with @Bean

I need some help with creating Aspect bean. I have module A, B... and module starter-x. I have a couple of Aspects declared in module starter-x, and configura

How to add new Datasource at runtime Spring Boot

I have this, but I don't find any possible solution. All the answers I found was about configuring two or more Datasource or Multitenant Dabatase, but It is not

ORM framework for reactive applications

I have been looking at spring-data-r2dbc for reactive DB access. But it seems it doesn't provide any ORM suppport, as stated on the project's page, it is not an

Creating Pagination in Spring Data JPA

I am trying to implement pagination feature in Spring Data JPA. I am referring this Blog My Controller contains following code : @RequestMapping(value="/orga