Search results for: Maven

Output: Java   Methods from the StringUtils class that we can use to get a substring from String in Java: import org.apache.commons.lang3.StringUtils; public class Test { public static void main(String[] args) { String str = “Hello, my name is Tom, and I live in USA”; String substringBefore = StringUtils.substringBefore(str, “,”); String substringAfter = StringUtils.substringAfter(str, “,”); String substringBetween = StringUtils.substringBetween(str,…

Read More Get Substring from String in Java

In this tutorial, I’ll guide you on how to use the new OAuth2 Authorization Server(v0.0.3) built by the Spring Team. Below are the new features that have been introduced in the newer version: Enforce one-time use for authorization code Introduce OAuth2 Tokens Add Refresh Token grant Implement Token Revocation Endpoint OAuth2 is an authorization method…

Read More The New OAuth2 Authorization Server

An important property of modern web apps is resilience. In simple terms, resilience refers to the ability of a system or feature to fail gracefully without impacting the entire system. In the context of web apps, we want to ensure that the entire system will not go down if a remote service, such as a…

Read More Enforcing Resilience in Spring Boot with Resilience4J

This tutorial is the fifth in a series on Reactive Programming in Java and Spring Framework. In this tutorial, we will develop a simple REST API using Spring Web flux. To completely understand this tutorial, it is better to read a previous tutorial first. It would also help to know how to develop a REST Controller using…

Read More Developing a REST API using Spring WebFlux

In this tutorial, you will learn how to create a custom password encoder in a Spring Boot application that uses Spring Security. Table of contents Create a Spring Boot project and add database connection properties, Add a User model, Create a User repository, Implement a custom PasswordEncoder, Create a service class that implements UserDetailService, Add…

Read More Custom Password Encoder in Spring Security

Multiple data source implementations are very crucial in instances where we want to secure the application from vulnerabilities such as a database failure. This will ensure that the application can still function even if part of the database went down. This tutorial will use student and course entities to demonstrate how multiple data sources can…

Read More Multiple Datasources in Spring Application

This article is the third of a series on Reactive Programming. If you have not read the previous article, I would strongly advise you to do so. In this article, we will discuss how Reactive Programming is made possible in Spring. Spring WebFlux Spring WebFlux is the Spring project that makes Reactive Programming possible in…

Read More Reactive Programming In Spring Framework

This tutorial demonstrates how to deploy a Spring Boot REST app to Tomcat 10. Apache states that the Jakarta EE platform represents the evolution of the Java EE platform. Tomcat 10 and later versions implement specifications that were developed as part of Jakarta EE. In contrast, Tomcat 9 and earlier versions implement specifications that were…

Read More Deploy a Spring Boot App as a WAR to Tomcat 10

In this tutorial, you will learn how to use specification and predicate in Spring Data JPA using the Spring Boot RESTful API project. Spring Data JPA Specifications allow us to create dynamic database queries by using the JPA Criteria API. It defines a specification as a predicate over an entity. Spring has a wrapper around…

Read More Specification & Predicate: Advance Search and Filtering in JPA

This tutorial will teach you how to create your own Spring Cloud Config Server and how to configure a Spring Boot Application to be a Spring Cloud Config Client. Spring Cloud Config Server Spring Cloud Config Server is a Spring Boot application. So to create our own Spring Cloud Config Server, we must first create…

Read More Spring Cloud Config Server and Config Client

What do you want to learn today? Jersey & JAX-RS Recent Tutorials DTO to Entity and Entity to DTO Conversion Sergey Kargopolov Java | Jersey JAX-RS | RESTful Web Services | Spring Boot | Spring MVC Almost in every RESTful Web Service application, I have to do the DTO to Entity and then Entity to…

Read More Jersey & JAX-RS

What do you want to learn today? Spring Cloud Recent Tutorials Spring Cloud API Gateway Global Filter Example Sergey Kargopolov Spring Cloud In this tutorial, you will learn how to create a very simple Spring Cloud API Gateway Global Pre-filter and Post filter classes. Global filters are Read More The Header Predicate in Spring Cloud…

Read More Spring Cloud Tutorials

What do you want to learn today? Spring Boot Recent Tutorials Start Spring Boot App on a Random Port Number Sergey Kargopolov Spring Boot | Spring Cloud In this tutorial, you will learn how to start your Spring Boot application on a random port number. This is very helpful when you need Read More Start…

Read More Spring Boot Tutorials

In this tutorial, you will learn about the main difference between the “mvn package” and “mvn install” commands. As well as how to use both commands on your computer. “mvn package” vs “mvn install” The main difference between the “mvn package” and “mvn install” commands is that mvn package command will compile the source and will package it in its…

Read More Difference Between “mvn package” and “mvn install”