springboot

Circuit Breaker in microservices : Istio

Reading Time: 4 minutes Hey guys,Today we’ll find out what circuit breakers are, why you should be using them in any distributed system or microservices architecture along with Istio. Why Circuit Breaker? We’ve got a series of microservices here that don’t have to be microservices ( in Kubernetes these will be pods, services, etc ). They’re going to be connected together in some way, a cascading failure is where Continue Reading

Getting Started – Spring Boot with MongoDB

Reading Time: 6 minutes Spring Boot with MongoDB Topics to cover in Spring Boot and MongoDB In this blog we are going to see the beginning basics of what Spring Boot is? Ways to create Spring Boot Application? What is MongoDB? How to install MongoDB in Ubuntu? How to connect Spring Boot with MongoDB in Ubuntu? Let’s dive right in… What is Spring Boot? Spring Boot is a module Continue Reading

Resilience4j at a Glance

Reading Time: 4 minutes Resilience4j at a Glance Scope of this article is applications based on microservice architecture. Let me begin with a question, what is most important non-functional requirement from any application? Undoubtedly the answer of this question will be ‘Robustness’. This means applications must behave reasonable with respect to adverse scenarios. Against all adverse scenarios application needs to take either corrective action or redirect to reasonable action Continue Reading

Querying Array of String using JPA Specification

Reading Time: 2 minutes Writing dynamic queries using JPA Specification could be a hard to understand and implement but lets make it simple and easy to understand! To query array of string in postgreSQL , we might use a query like this : select * from employee where ARRAY_TO_STRING(keywords, ‘,’) LIKE ‘%lunch%’; To use specification for querying array string datatype ,we will have to Define a custom dialect to Continue Reading

Unit testing void methods with Mockito and JUnit

Reading Time: 3 minutes Writing functionality is the main focus whenever we are writing a software program, but it is equally important that we make sure our code works the way we intended it to. And how do we do that? By writing unit test cases. They are used to test the smallest functionality of code. Unit test cases are an essential part of software development. In this blog, Continue Reading

How to set default column value in JPA

Reading Time: < 1 minute There might be a situation when you want to set the default value of column in spring boot. You might be thinking how to set it even when you have set the default value in the database but you still get a null value stored in the database . It is because JPA includes the columns with null value in the insert query which you Continue Reading

Beginner’s Guide to GraphQL with Spring Boot

Reading Time: 4 minutes The world is a stage where all of us are artists. Constant learning is the foundation of success. So here we are going to have a tutorial on GraphQL in which we will see how to create a GraphQL server in Java. Objective We are going to query the details for a specific song from an online platform. Prerequisite Basic knowledge of:– Spring Boot– Java– Continue Reading

Spring Beans in Java

Reading Time: 2 minutes Spring IoC container is the core of the Spring Framework.In spring-based applications, objects live inside a spring containerThe container instantiate the objects, wires them together and manages their complete life cycle from creation till destruction.These objects in the Spring IoC container are referred to as beans. What is Inversion Of Control(IoC)? IoC simply means giving control to spring container to create and instantiate the spring beans Let`s say you want to Continue Reading

How to handle URL Encoded Form Data in Spring REST?

Reading Time: 3 minutes Sometimes, our REST endpoint needs to consume data in the form of application/x-www-form-urlencoded or using multipart/form-data. The source of this data can probably be an HTML form. Now, the first question which should come to our mind is, what is exactly this application/x-www-form-urlencoded or using multipart/form-data and how can we let our spring application consume this. This blog will help you to find answers to Continue Reading

Aspect Oriented Programming with Spring

Reading Time: 4 minutes What is AOP? Applications are generally developed with multiple layers. A typical Java application has Web Layer – Exposing the services to the outside world using REST or a web application Business Layer – Business Logic Data Layer – Persistence Logic While the responsibilities of each of these layers are different, there are a few common aspects that apply to all layers Logging Security These Continue Reading