Centralizing Configuration for Microservices with Spring Cloud ConfigSpring Cloud Config Server is a powerful tool for managing configuration in a microservices architecture. It allows to centralize configuration data and make it easily accessible to all microservices. With Spring Cloud Config Server, we can store the...Oct 24, 2023·3 min read
Java Interview question-16Question 151: How mutable reference can be handled in an immutable class? To handle mutable references in an immutable class: Use defensive copying. Wrap mutable objects with immutable wrappers. Return defensive copies of mutable objects. Ensure ...Oct 22, 2023·8 min read
Java Interview question-15Question 141: What is the use of default methods in Java? Interface evolution: They allow adding new methods to interfaces without breaking existing implementations. Backward compatibility: Default methods enable enhancing interfaces without breaki...Oct 22, 2023·7 min read
Java Interview question-14Question 131: Can singleton bean scope handle multiple parallel requests? Singleton scope is designed to create a single instance of a bean that is shared by multiple threads throughout the lifetime of the application. This means that multiple thread...Oct 22, 2023·4 min read
Java Interview question-13Question 121: Merge two employee arraylist and sort them based on age in ascending order using stream java import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.stream.Collectors; class Employee { priva...Oct 22, 2023·8 min read
Java Interview question-12Question 111: Suppose you have to migrate an existing monolithic application to microservices?What will be your approach ? Migrating an existing monolithic application to a microservices architecture is a complex process that requires careful plannin...Oct 22, 2023·21 min read
Java Interview question-113 Question 101: How to create an immutable class in java? An immutable class in Java is a class whose objects cannot be modified once they are created. Here are the steps to create an immutable class in Java: Declare the class as final: By declaring...Oct 22, 2023·10 min read