Java™

Home/Java™

Managed beans using @Component, @Repository, @Service

Introduction: In this tutorial, you will learn the different Spring stereotype annotations (@Component, @Repository and @Service) to declare any class as a Spring-managed Bean. Spring MVC also has several other annotations like @Controller and @RestController. The classes that are managed as beans in Spring are known as Managed Components. There are basically few stereotype annotations in spring that declare classes [...]

By |2020-04-03T18:42:22+00:00April 3rd, 2020|Categories: Java™, Spring Framework|Tags: |

Top Youtube Channels for every Java Developer

Everyone today wants to stay up to date in this ultra speed world, especially when it comes to programming knowledge. There were times when a Java developer could survive without much updating themself for years, but those days are gone. Today technology is evolving very fast, we need to sharpen our programming skills to stay relevant with the latest and [...]

By |2020-04-01T12:32:59+00:00April 1st, 2020|Categories: Java™|Tags: |

Complete RabbitMQ Tutorial in Java

Complete RabbitMQ Tutorial in Java with Spring Boot example This is a RabbitMQ Course in Java with asynchronous messaging examples using rabbitmq-java-client, Spring Boot and Spring AMQP. This is a programming course, it focuses more on the asynchronous programming than the admin UI. I have tried to keep the tutorial up-to-date with the latest Java trends. Code Examples [...]

By |2020-04-03T14:23:10+00:00March 28th, 2020|Categories: Java™, RabbitMQ|Tags: , |

Object Pool Design Pattern in Java with a real-world example

Object pool design pattern in Java works on the reusability concept of the object creation. This pattern is most efficient when it is expensive to create objects and can cause memory issues if multiple objects are created. It helps to improve the performance of the application. Object pool design pattern works on the concept of object pooling. In other words, [...]

By |2020-03-23T19:18:27+00:00March 18th, 2020|Categories: Java™|Tags: |

Elements of AMQP – Advanced Message Queuing protocol

In this tutorial, we will learn the different elements of AMQP to work with RabbitMQ. I have already talked about the basics of RabbitMQ in the previous introduction article. Lets first learn the basics components of any messaging system and then we will get into the elements of AMQP. Basic components of a Messaging system Any messaging system is made [...]

By |2020-03-17T15:05:58+00:00March 16th, 2020|Categories: Java™, RabbitMQ|Tags: |

Introduction to RabbitMQ

More and more companies are adapting to Microservices due to reliability and scalability. Software architectures are rethinking their system designs, monolithic applications are evolving into microservices and infrastructures are moving to cloud. Messaging is undoubtedly an important facet of any microservice architecture. RabbitMQ is a message broker (message queuing software) used to exchange data between processes, applications, systems or servers. [...]

By |2020-03-17T00:00:45+00:00March 1st, 2020|Categories: Java™, RabbitMQ|Tags: , |

Fine-tune auto wiring using @Primary and @Qualifier

Introduction Autowiring by type can lead to ambiguity when we have multiple beans of the same base class type. Because there are multiple beans of the same type, it is important to have control over the bean selection process. Spring provides @Primary annotation which declares a specific bean as primary, which means primary bean will be given higher preferences when [...]

By |2020-02-26T17:52:42+00:00February 26th, 2020|Categories: Java™, Spring Framework|Tags: |

Dependency Injection: @Autowired, @Resource and @Inject

In Spring Framework, you can basically use any of the three annotations for Dependency Injection, namely @Autowired, @Resource and @Inject. The @Autowired annotation belongs to the core-spring, however, the other two belongs to the Java extension package @javax.annotation.Resource and @javax.inject.Inject. We will look into the use of each of these annotations with a practical use case, to help you choose [...]

By |2020-02-24T17:06:37+00:00February 23rd, 2020|Categories: Java™, Spring Framework|Tags: |

Spring BeanPostProcessor to customize beans

Spring BeanPostProcessor beans are a special kind of beans that get created before any other beans and Spring allows you to assign customize callbacks to it. Spring provides the BeanPostProcessor interface, you can implement its methods to provide your own instantiation logic and dependency resolution logic. NOTE - the following before working with BeanPostProcessor. BeanPostProcessor methods are executed after the [...]

By |2020-02-16T02:04:24+00:00February 15th, 2020|Categories: Java™, Spring Framework|Tags: , |

Spring bean definition Inheritance

In Spring Framework, bean definition inheritance (bean configuration inheritance) is a valuable time-saving feature we must learn. As you know, a bean definition is nothing but the configuration for the Spring IoC container to create our bean as per the details. Refer to the article Inversion of Control and Dependency Injection in Spring, if you need to understand the basics [...]

By |2020-02-13T12:49:14+00:00February 13th, 2020|Categories: Java™, Spring Framework|Tags: |