Consumer Driven Contracts are considered a design pattern for evolving services. Spring Cloud Contract can be used to implement consumer driven contracts for services developed using the Spring Framework. In this post, I’ll take an in depth look at using Spring Cloud Contract to create Consumer Driven Contracts. An Overview of Spring Cloud Contract Let’s consider aContinue reading

0
Share

In applications, you often need to work with a set of constant values. For example, representing a contract status with the “permanent”, “temp”, and “intern” values, or directions with the “north”, “south”, “east”, and “west” values. In Java, you use the enum type (short for enumeration), a special datatype introduced in Java 5 to representContinue reading

0
Share

Converting a Java Map to a List is a very common task. Map and List are common data structures used in Java. A Map is a collection of key value pairs. While a  List is an ordered collection of objects in which duplicate values can be stored. In this post, I will discuss different ways toContinue reading

0
Share

MySQL is the most popular open-source database management system. MySQL uses a relational database and Structured Query Language (SQL) to manage its data. In this post, I’ll show you how to install MySQL on Ubuntu. Installing MySQL There are two ways to install MySQL on Ubuntu. First is to use one of the versions includedContinue reading

0
Share

When you are developing Spring Boot applications with database interactions, you typically use Hibernate as the Object Relationship Mapping (ORM) tool. Instead of directly coupling your code with Hibernate, often you’d rather use Spring Data JPA, a Spring Framework project. Spring Data JPA makes implementation of the data access layer incredibly easy by abstracting mostContinue reading

2
Share

A common requirement while programming in Java is to convert String to int. UI inputs in Web-based HTML, JSP, or Thymeleaf templates are transferred to backend Java applications as strings. It is the application developer’s responsibility to perform any String to int conversions to fulfil business logic, such as calculating discounts, storing age, and soContinue reading

0
Share

Java Architecture for XML Binding (JAXB) is a library that helps to bind XML schemas and Java representations. JAXB provides you with a mechanism to marshal Java objects into XML and the other way around – unmarshal XML into Java objects. XML is an industry standard for defining the contents of your message. XML alongContinue reading

3
Share

One common requirement in Java application is to iterate through the elements of a collection. Prior to Java 8, the three most common ways to iterate through a collection are by using the while loop, for loop, and enhanced for loop. As the Java Collection interface extends Iterable, you can also use the hasNext() andContinue reading

3
Share