Implement Service Discovery Pattern With Eureka And ConsulIn the previous post, we looked at what Discovery Server in microservices is and what are the problems it solves. In the post, we’ll implement the service discovery pattern with Eureka and Consul with Spring Boot. Netflix Eureka Netflix Eureka is one...Jul 31, 2023·4 min read
JPA: One-To-One Relationship, Fetch type, Relationship Direction, And Query OptimizationIn the previous posts, we had only a single entity called the student. Let's create another entity named the library card. The library card entity will have its own table in the database with its own primary id column. @Entity @Table(name = "library_...Jul 11, 2023·7 min read
Persisting non-primitive types in JPAIn this post, we'll look at how we can persist non-primitive data types in JPA. The primitive data types like int, char, byte, String, boolean, or their respective wrapper classes are mapped automatically by default into the correct database types by...Jun 25, 2023·4 min read
Know The JPA Persistence.xml FileIn the previous posts, we set up the Java project and connected it to a database with JPA, and hibernate. Let's look back on the persistence.xml file we created and understand it in more detail. The location of this file is src -> META-INF -> persis...Jun 21, 2023·3 min read
Simplifying Database Operations with JPA and Hibernate: Creating and Persisting ObjectsIn the previous post, we set up a database and JPA configurations, Let's create a Java class Student, and see how to make it work with JPA. Let us create a Student class with just two fields id and name. 💡 Note: Classes only contain member variable...Jun 15, 2023·3 min read
Set Up a Barebones Java project with JPATypically JPA is integrated with Spring/Spring Boot and Java EE/Jakarta EE applications. Both these applications provide an abstraction over the JPA which hides a lot of stuff that we need to do manually in a barebones Java application. This abstract...Jun 9, 2023·3 min read
Getting Started With Hibernate And JPAWhy learn JPA? If you are developing Java applications that connect a database( which they usually do), to create a connection between the database and the application we use JPA. JPA is used only with relation databases not with non-relational datab...May 28, 2023·3 min read