No one can deny from the fact that Security is a vital feature of a production ready application. Although we can secure one web application using In-memory authentication, JDBC Authentication or via UserDetailsService. But when one application uses the services of other application internally, then implementation of security with webservices concept becomes important. In this situation we secure our application using a token which has a particular period of validity. In this article, we are going to learn 'How to implement JWT Authentication in Spring Boot Project?' to understand the concept behind JWT(JSON Web Token) Authentication as a whole. As JWT stands for 'JSON Web Token', it is clear that the token holds the data in the form of JSON only. Moreover,
Improvements In Java Collection API
In this article "Improvements in Java Collection API" we will learn about the origin of classes in different versions of jdk. Also, If any new class or interface introduced, what was the purpose of introducing that? What was the weakness of previous version of it? Why the new class/interface introduced? What all new features introduced in Collection classes/interfaces? and so on. We are going to discuss about these kinds of questions in this article accordingly. In fact, we will learn about Enhancement of java collection classes step by step & also version by version simultaneously. Primarily, we will focus on Java collection features in JDK 1.0, 1.2, 1.4, 1.5, 1.6 and 1.8, 9 10, 11, 21 respectively. Improvements in Java Collection
How to read Excel file in Java Spring Boot and upload into Database?
Many clients provide their data in the form of excel sheet and request developer to save it in your database as it is. If you ever have implemented โHow to read Excel file in Java Spring Boot and upload into Database?โ, itโs good. If not, no worries!, we will learn the same in this article. In the end, you will find it very easy & fast way to get it done. In fact, once you go through the complete article you will observe that you only need to provide the location of your excel file in application.properties file. You will get the data uploaded into database by making small changes in your own entity classes only. We will not promote
How to register Microservices in Eureka Server
In the series of Microservices Tutorial, we have already discussed on Microservices Architecture and Microservices in Java in a theoretical way. Now in this article, we will create an example by using Netflix Eureka in the context of Microservices. We will use Netflix Eureka to register & discover Microservices. In order to make intra-communication happen between multiple micro services, it is mandatory to register & discover them in the application. It is possible by using Netflix Eureka Server. Hence, we will talk about 'How to register Microservices in Eureka Server?' in this article. In order to make communication happen among all microservices in an application, there should be a common medium. Subsequently, that common medium should have details of all microservices
How to implement Spring Boot Thymeleaf Security Login Example?
In continuation to previous article on two different ways of implementing Spring Security, here in this article we will learn the third way 'How to implement Spring Boot Thymeleaf Security Login Example using UserDetailsService?'. After going through the previous article, I hope we all are very familiar with basics of Security and even the basics of Security in a Spring Boot application. This time we will create a user registration form and save users with their roles into database. Then, based on the user role, we will check the authentication and authorization functionalities with the help of predefined UserDetailsService. If you are looking for 'How to implement Security in Spring Boot using UserDetailsService with Spring Boot 3 onward?, kindly visit a
Spring Data MongoDB Tutorial
In today's data-motivated world, it becomes very crucial to manage and query huge volumes of data efficiently for businesses to stay competitive. MongoDB, a popular NoSQL database, offers flexibility and scalability. On the other hand, Spring Data provides a powerful framework for simplifying data management in Java applications. The term 'Spring Data MongoDB' is nothing, but it is a combination of both 'Spring Data' and 'MongoDB'. In simple words, Spring Data MongoDB is a small readymade project provided by Spring community, that simplifies the process of how a Spring based application interacts with MongoDB, a NoSQL database. In this article, we will explore the world of Spring Data MongoDB, investigating its features, benefits, and practical examples to help you utilize its
How to implement Fault Tolerance in Microservices using Resilience4j?
When we develop an application, especially a Microservices-based applications, there are high chances that we experience some deviations while running it in real time. Sometimes, it could be slow response, network failures, REST call failures, failures due to the high number of requests and much more. In order to tolerate these kinds of suspected faults, we need to incorporate Fault Tolerance mechanism in our application. To achieve it, we will make use of Resilience4j library. Resilience4j is a lightweight, easy-to-use fault tolerance library inspired byย Netflix Hystrix, but designed for Java 8 and functional programming. So, our focus in this article will be on 'How to implement Fault Tolerance in Microservices using Resilience4j?' After implementing the Fault Tolerance in Microservices using Resilience4j,
Spring Boot Cassandra CRUD Examples
In continuation to Cassandra DB installation, now it's time to discuss about the most important CRUD operations using Cassandra DB. If we are in Software development world, we should at least know โHow to write CRUD operation on the database frontโ. Needless to say, how much importance these operations have in an application development. If you are developing any web application in any programming language, you canโt escape from these operations. CRUD is nothing but an abbreviation to Create, Read, Update and Delete. Moreover, development of CRUD operations is expected from all developers. We will learn โSpring Boot Cassandra CRUD Examplesโ in this article. Software/Technologies Used in the Examples Sometimes a specific version conflicts with another version. In order to avoid such
Singleton Class In Java With Examples: A Comprehensive Guide
In this article, we will explore the concept of Singleton class in Java, with different implementation techniques, their advantages and disadvantages, and provide various code examples to demonstrate their utilization. In Java programming, the concept of Singleton class comes from the Singleton design pattern which is one of the most commonly used design patterns in Java. It comes under the category of creational design patterns and is used to ensure that a class has only one instance and provides a global point of access to that instance. What is a Singleton class in Java? A class that can have only one instance (object) at any given time during the runtime of an application. It provides a global point of access to this instance,
Static Keyword In Java With Examples
The understanding of static keyword in java is so important that we as a java programmer cannot imagine a single runnable program without a static keyword. If we want to run a small program, we must use either main() method (which is static) or a static variable/block till JDK 1.6. Even we don't have the static variable/block option to run the program starting JDK 1.7 onward. Therefore, we should know all about the static keyword and keep in mind the significance of 'Static in Java'. We as a Java developer can't leave the static keyword untouched. Hence, we should have a clear understanding of static in java mandatorily. Additionally, the static keyword in java is an important topic in the interview