Spring

Spring Core Annotations

Introduction: Spring annotations present in the org.springframework.beans.factory.annotation and org.springframework.context.annotation packages are commonly known as Spring Core annotations. We can divide them into two broad categories: DI-Related Annotations & Context Configuration Annotations:     In this tutorial, we’ll explore all of these Spring Core annotations. DI-Related Annotations: 1. @Autowired: We use @Autowired to mark the dependency which […]

One comment Read More
Other Tutorials

Creating Custom Maven Archetype

Introduction: Maven archetypes are the project templates which can help us quickly create a maven starter project based on its type. It’s a great tool to bootstrap a maven project with least effort. There are wide options of archetypes available to us. Some of the popular archetypes include – maven-archetype-quickstart, maven-archetype-webapp, maven-archetype-archetype. To create a […]

3 comments Read More
Other Tutorials

Maven Dependency Scopes

Introduction: Managing dependencies is a core feature of Maven. When defining a maven dependency, the scope attribute defines the visibility of that dependency on different maven lifecycle phases such as build, test and run. The dependency scopes limit the transitivity of dependencies in any project, thereby affecting the classpath. Also, there are six different available […]

3 comments Read More
Core Java

Using Spliterator In Java

Introduction: Iterators in Java are used to traverse elements of a given source. Spliterator in Java is one among the four available Java Iterators – Iterator, Enumeration, ListIterator, and Spliterator. It is an interface available in java.util package. Spliterator was first introduced in Java 8 to support parallel programming. However, we can use it for […]

Be the First to comment. Read More
Core Java

Java TreeMap vs HashMap

Introduction: In this quick post, we’re gonna look at the similarities as well as the differences between Java HashMap and TreeMap. Similarities: Before we dive into the differences between Java HashMap and TreeMap, let’s first look at their similarities: Both extend java.util.AbstractMap class and are part of Java Collections API Both of these Map implementations aren’t […]

Be the First to comment. Read More
Other Tutorials

Hibernate Many To Many Tutorial

Introduction: In this tutorial, we’ll learn to define and use a many-to-many entity association using Hibernate @ManyToMany annotation. Context BuildUp: To follow along with this tutorial, let’s say we have two entities – Employee and Qualification: As we know, one employee can multiple qualifications. Also, there can be N number of employees with a specific […]

One comment Read More
Other Tutorials

Identifiers In Hibernate

Introduction: Identifiers in Hibernate model the primary key attribute of an entity. It helps us to uniquely identify a JPA entity. Every entity must define an identifier. Also, it can be either simple or composite. We can define a Hibernate identifier in several ways. In this tutorial, we’ll learn how to do so. Simple (Single-Valued) […]

One comment Read More
Spring

Spring MVC @Controller vs @RestController Annotation

Introduction: In this tutorial, we’ll look at the difference between @Controller and @RestController annotations in Spring MVC. The @Controller annotation has been part of the Spring framework from the very beginning. As its name suggests, it defines a controller: an entry-point for a Spring Web application. Spring 4 introduced a @RestController annotation. It is a […]

One comment Read More
Core Java

Primitive Type Streams In Java

Introduction: In this tutorial, we’ll learn how to use the Java 8 Streams API with the primitive data types. Java 8 Streams API is a powerful API to efficiently process a sequence of elements. If you wish to learn about Java 8 Streams API, please check out this tutorial. Stream Over Java Primitives: As we […]

Be the First to comment. Read More
Core Java

Java DAO Pattern

Introduction: The DAO or the Data Access Object pattern is a very popular structural design pattern that separates the persistence logic in a separate layer. The idea is to abstract or hide the database logic from the business layer. It helps in hiding unnecessary CRUD operation and storage details from our service layer so that […]

2 comments Read More