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,
Spring Boot
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 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
Spring Batch Example CSV to MySQL: JPA Batch Insert
Sometimes in real time projects, we need to transfer data from one location to another. If the volume of data is small, we can achieve this by applying any traditional approach. On the other hand, if there is a huge amount of data, we can make use of the Spring Batch API to make the transfer of data faster and performant. In this article 'Spring Batch Example CSV to MySQL Using JPA', we are going to transfer the data from CSV file to MySQL database using Spring Boot Batch. We have already discussed theoretical concepts of Spring Batch in a separate article 'Spring Batch Tutorial'. Now, its time to implement our example 'Spring Batch Example CSV to MySQL Using JPA'. What will
Features Of Spring Boot
After knowing about 'What is Spring Boot?' in detail in a separate article, it's time to talk about the features of Spring Boot. Needless to say, Spring Boot is full of features, that's why it is being used in the majority of Java projects now-a-days. In this article, we are going to discuss features of Spring Boot in detail. If you are attending any interview of Java/Spring Boot, there are high chances that you may be asked to tell about some important features of Spring Boot. Spring-Boot comes with a lot of handy features that make the developer's life easier. Below are some of the important features of Spring Boot. Features of Spring Boot Spring Boot offers a variety of features that simplify
Spring Boot 3 Migration- Migrate Spring Boot 2 To Spring Boot 3
After going through the major highlights of 'New Features in Spring Boot 3.0, it's time to check the process of Spring Boot 3 Migration ('How To Migrate Spring Boot 2 To Spring Boot 3'). Here in this article we will be talking about the step by step migration process to Spring Boot 3. Before getting into to the spring boot 3 migration process, you should go through any documentation to understand the important artifacts in the same. It always helps in minimizing any potential risk factor in the process. Let's start discussing 'How To Migrate Spring Boot 2 To Spring Boot 3'. Spring Boot 3 Migration: How To Migrate Spring Boot 2 To Spring Boot 3? Let's go through step by step
Spring Security UserDetailsService Using Spring Boot 3
In continuation to series of articles on Spring Security, here in this article we will learn 'How to implement Security in Spring Boot using UserDetailsService With Spring Boot 3?'. After going through the previous articles, I hope we all are very familiar with basics of Security and even the basics of Security in a Spring Boot application. After the release of Spring Boot 3, here we are going to implement 'Spring Security UserDetailsService Using Spring Boot 3'. In this article, we will create a user registration form and save users with their roles in the database. Then, based on the user role, we will check the authentication and authorization functionalities with the help of predefined UserDetailsService. To illustrate, we will take some