Saturday, May 27, 2023
Aggregator Design Pattern In Java Microservices with Examples
What is Circuit Breaker Design Pattern in Microservices? How to implement it?
Friday, May 26, 2023
How to find Kth Smallest Element in a Binary Search Tree? [Solved]
How to find the maximum sum level in binary tree in Java? Example Tutorial
Thursday, May 25, 2023
Difference between application.properties vs Application.json vs Application.yml in Spring Boot
Difference between @RequestParam vs @RequestBody in Spring MVC? (with Example)
Difference between Spring Boot vs Spring Cloud in Java
Hello guys, if you are wondering, what is difference between Spring Boot and Spring Cloud then you re not alone. Many Java developer are not familiar with various spring boot projects like Spring Security, Spring Data JPA, Spring Batch, Spring Boot, Spring Cloud etc and this lack of knowledge prevent them from taking full advantage of Spring Framework. In last article, I have explained difference between Spring framework and Spring Boot and in this article we are going to discuss the difference between Spring Boot and Spring Cloud. Before we dive into the difference between the two terms. Let us take a look at different terms like Spring, Spring Boot, and Spring Cloud.
Wednesday, May 24, 2023
10 Examples of RestTemplate in Spring Framework
How to Handle REST exception in Spring Boot Application? Example Tutorial
Hello everyone, in this article we are going to take a look at how to handle REST API exceptions in Spring Boot. It is crucial to handle errors correctly in APIs by displaying meaningful messages as it helps API clients to address problems easily. What happens if we don’t handle the errors manually? By default, the spring application throws a stack trace, which is difficult to understand. Stack traces are mainly for developers hence it is useless for API clients. That's why its very important to use proper HTTP code and error messages to convey errors and exception to client and also logging so that support team can better handle them. Ideally you should tell what went wrong and how to fix it? For example, if the error is due to duplicate data then clearly say, already existed, try with a new one. Similarly, if authentication fail then clearly say authentication failed instead of throwing some other exception.
Tuesday, May 23, 2023
Difference between VARCHAR and CHAR data type in SQL Server? [Explained]
What is window function in SQL with Examples? How and when to use them?
Monday, May 22, 2023
How to set base URL for REST in Spring Boot? Example Tutorial
How to Enable Disable Spring Security in Spring Boot? Example Tutorial
Sunday, May 21, 2023
Top 5 Spring Boot 3 Features for Java Developers
How to do Integration Testing in Spring Framework? @SpringBootTest Example Java
Hello guys, if you are wondering how to test your Spring Boot application then you have come to the right place. Earlier, I have shared popular Spring Boot Testing Interview Questions and Spring Security Interview Questions and In this article, I will show you examples to test your Spring Boot application using @SpringBootTest annotation, which allows you to write Integration tests. When I talk about spring boot integration testing, I am talking about launching an application in ApplicationContext and performing tests. For integration testing, Spring Framework has a specific test module. It's referred to as a spring test. If we're going to utilize spring-boot, we'll need to use spring-boot-starter-test, which uses spring-test and other dependencies inside.
5 Essential Spring Boot Annotations with Examples in Java - Tutorial
Saturday, May 20, 2023
How to upload a file and JSON data in Postman? Example Tutorial
Spring Boot Backend + Vuejs Example [Java tutorial] - Part 1
In this tutorial, we will show you the Vue.js HTTP client and Spring Boot Server example that uses Spring JPA to do the CRUD with the H2 database and Vue.js as frontend technology to make requests and receive responses. But before moving to the Spring Boot and VueJs Example, Let's discuss what is Vuejs and its use cases.
Friday, May 19, 2023
Top 5 Spring 6 New Features Java Developer Should Learn
What is API Gateway Design Pattern in Microservices? With Examples
Thursday, May 18, 2023
Java + Spring Boot + Microservices Example - Step by Step Guide
Monday, May 15, 2023
Asynchronous Messaging In Java? JMS, Kafka, and RabbitMQ Examples Tutorials
What is CQRS Pattern in Java Microservices? Command Query Responsibility Segregation Example Tutorial
Hello guys, if you are wondering what is CQRS pattern and when and how to use it in your Microservices then you have come to the right place. CQRS is one of the 10 essential Microservice pattern and can be used when your application is either read heavy or write heavy and reading and writing requirement are very different. It aims to separate your app into two parts, command part which writes data and query part which read data and that's how it allows you to develop, scale and optimize them separately. It's also one of the popular Microservices Questions and if you are preparing for interviews, you should prepare this pattern as well. Earlier, I have explained SAGA Pattern and Database Per Microservice pattern and in this article I will explain CQRS pattern, when to use it and what problem does it solve.
Sunday, May 14, 2023
How To Implement Security in Microservices Architecture
Saturday, May 13, 2023
SAGA Design Pattern In Java Microservices with Example
Hello guys, if you want to learn about SAGA Microservice design pattern then you have come to the right place. SAGA is one of the 10 essential Microservice Design Patterns I have shared earlier and it solve a critical problem related to distributed transaction. But, before we get to the different examples that will teach you all about SAGA microservice design patterns in Java, let me tell you a bit more about what it really is. A microservice-based application is basically a distributed system. The overall system consists of multiple minor services, which provide the overall application functionality. This architectural style offers numerous benefits as well as several limitations. SAGA Pattern is also one of the popular Microservice interview question and if you are going for interview, it make sense to learn and understand this design pattern in depth.
Friday, May 12, 2023
What is Event Sourcing Design Pattern in Java Microservices? Example
Hello Java programmers, if you are tired of constantly trying to keep track of your application's current state using a traditional relational database then the Event Sourcing pattern might be just what you need. Event Sourcing is a popular pattern in Microservice architecture that allows services to persist and query the state of an application using a sequence of events instead of storing the current state. This pattern has gained popularity because it helps to build complex systems with a clear audit trail and support for long-term scalability. By storing a sequence of events, rather than just the latest state, developers can reconstruct the application state at any point in time, even after failures or bugs. It's also one of the 10 essential Microservice patterns I have shared earlier and it's one of the top 3 along with Saga and CQRS patterns which we have seen in my earlier articles.