Author: Editorial Team
-
Spring @Qualifier annotation
1. Introduction In this tutorial, we’ll discuss what is the use of @Qualifier annotation and which problem it solves. In this tutorial we’ll also discuss how @Qualifier is different from @Primary annotation. 2. What problem does @Qualifier solve? While autowiring beans, Spring by default searches by types and does the bean injection. However, Spring may…
-
Naming strategies in Hibernate
1. Introduction Hibernate as an ORM mapping tool maps objects in domain model to the relational model. To do this mapping, Hibernate has to identify which Java object to map with which relational model. ImplicitNamingStrategy and PhysicalNamingStrategy are used to identify how the mapping of names should be done. The mapping of names is done…
-
Stream peek() Method in Java
1. Introduction The syntax of peek method is: 2. peek method without terminal operation peek() is an intermediate operation and does nothing unless terminal method is called. 3. peek method with terminal operation peek() method needs a terminal operation to start the processing. Output
-
Building and serving Angular apps with different profiles
1. Introduction In almost every project we have at least two environments: development and production. Usually there is a third environment as well, the staging environment. Usually the configurations for development environment are different than of production. Each environment has different configuration properties like API endpoint URLs. The common requirement is to define these properties…
-
Mapping Types in Hibernate
1. Introduction Hibernate is an ORM solution. It maps object model to a relational data model (and vice-versa). Usually the object model is a Plain Old Java Object (POJO), but it is not a mandatory requirement to use Hibernate. Hibernate can easily work with other objects like java.util.Map and can map to the relational model.…
-
void operator in JavaScript
1. Introduction Sometimes the requirement is to evaluate an expression that produces a value at a place where the expected result is undefined. Or simply to say, you want to evaluate an expression and result as undefined, the void operator can be used in such case. The void operator evaluates the given expression and then…
-
Documenting a Spring REST API Using OpenAPI 3.0
1. Introduction We need documentation to understand the code or a program. For example, documentation helps us understand what a method does and what it needs as arguments to perform the operation. Similarly, API documentation can also be generated which will be helpful to provide description, request and response format. Swagger is the most popular…
-
static in JavaScript
1. Introduction The static keyword is used to define static method, property or static initialization block for a class. A static method or property is accessed using the class name. A static method or static property can not be accessed using instance of the class. If a method or a property is not associated to…
-
Void Subject in RxJS
Sometimes the requirement is just to send a dummy value from a Subject. That is, what value is returned is irrelevant. The returned value logically represents that the event has occurred. For example, you want to keep track of every second. You can probably think of to write sometime like this: Sending a dummy value…
-
Subject in RxJS
1. Introduction An RxJS Subject is an Observable that allows values to be multicasted to many Observers. An RxJS Subject is different from the plain Observable with the fact that plain Observable is unicast, i.e. each Observer has an independent execution of the Observable. A RxJS subject is like an EventEmitter; it maintains the list…
