Year: 2017

When developing Spring Boot applications, you need to tell the Spring Framework where to look for Spring components. Using component scan is one method of asking Spring to detect Spring managed components. Spring needs the information to locate and register all the Spring components with the application context when the application starts. Spring can auto […]Continue reading

JSON has become the most preferred way of transmitting data across network connections. JSON being easily readable by machines is one of the many reasons for JSON’s popularity. However, JSON unless formatted well, is not easily readable by a human. Pretty printing a JSON is one common operation to improve the readability of the JSON. […]Continue reading

While developing applications, we often need to generate random numbers. Java provides support to generate random numbers primarily through the java.lang.Math and java.util.Random classes. In this post, I will discuss different ways to generate random numbers based on different types of requirements. Random Numbers using the Math Class Java provides the Math class in the […]Continue reading

Jackson is a suite of data-processing tools for Java comprising of three components: Streaming (jackson-core) defines low-level streaming API and includes JSON-specific implementations. Annotations (jackson-annotations) contains standard Jackson annotations. Databind (jackson-databind) implements data-binding (and object serialization) support on streaming package. This package depends both on streaming and annotations packages In this post, I will explain […]Continue reading

GSON is a very popular Java library for work with JSON. JavaScript Object Notation (JSON) is a lightweight data exchange format. Like XML, JSON provides a way of representing object that is both human readable and machine processable. In the Java ecosystem, there are several libraries that you can use to serialize Java objects to […]Continue reading

Introduction I’m quickly becoming a fan of using CircleCI for CI builds. I’m finding that CircleCI is a very powerful platform. Recently, I configured CircleCI to build a Spring Boot Microservice. The microservice was generated by JHipster. CircleCI is a online resource which uses Docker containers to run your CI builds. Since your build is […]Continue reading

The Java Programming language provided support for Annotations from Java 5.0. Leading Java frameworks were quick to adopt annotations and the Spring Framework started using annotations from the release 2.5. Due to the way they are defined, annotations provide a lot of context in their declaration. Prior to annotations, the behavior of the Spring Framework […]Continue reading

@RequestMapping is one of the most common annotation used in Spring Web applications. This annotation maps HTTP requests to handler methods of MVC and REST controllers. In this post, you’ll see how versatile the @RequestMapping annotation is when used to map Spring MVC controller methods. Request Mapping Basics In Spring MVC applications, the RequestDispatcher (Front Controller […]Continue reading

Spring Data MongoDB has been updated to leverage the reactive programming model introduced in Spring Framework 5. This was followed by support for reactive data access for NoSQL databases, such as MongoDB, Cassandra, and Redis. With the rise in popularity of NoSQL databases, MongoDB has rapidly gained popularity in the enterprise and the Spring community. […]Continue reading