Spring-Data


Spring-Data + MongoDB 2
Introduction Spring Data makes really quick and easy the process of working with data entities, offering a specific implementation for MongoDB. You can merely define queries by creating interfaces with methods following a naming convention or annotating them with @Query and Spring will automagically generate an implementation for you. Most of the times this is enough for simple CRUD and query operations and there is no need to define additional methods. This will allow you to get up and running really quickly avoiding to type boilerplate code. However, there are many times where this is not enough and the repository […]

Spring Data MongoDB: Custom repository implementation


Spring + EclipseLink JPA 12
Spring Data JPA Post updated on 2020-06-28. By default Spring uses Hibernate as the default JPA vendor. Although Hibernate is a good choice, some of us may prefer to use EclipseLink as it was supposed to be the reference implementation for the Java Persistence JSR. In this tutorial we will setup a Spring Boot application to use EclipseLink with an in-memory H2 database, although it can be used with any other database. You can check the source code in GitHub. Fixing dependencies In order to use EclipseLink, it’s recommended to remove Hibernate’s entity manager from the classpath to avoid collision problems. […]

Spring Data JPA + EclipseLink: Configuring Spring-Boot to use EclipseLink ...