In this post, under Spring Retry I will show with example how to configure ExponentialBackOffPolicy using annotations. For our example we will use the below service class Service class 1 package defaultPackage; 2 3 import java.util.Date; 4 5 import org.springframework.retry.annotation.Backoff; 6 import org.springframework.retry.annotation.Retryable; 7 import org.springframework.stereotype.Service; 8 9 @Service 10 public class Service15 { 11…… Continue reading Configuring ExponentialBackOffPolicy (using annotations)
Month: December 2022
Creating and Parsing a asymmetric key signed JWT containing claims
In this post under JJWT, I will show with example how to create and parse asymmetric key signed JWT containing claims. Below is the complete code for your reference. Main class 1 package defaultPackage; 2 import java.security.KeyPair; 3 import java.security.PrivateKey; 4 import java.security.PublicKey; 5 import java.util.Date; 6 7 import io.jsonwebtoken.Claims; 8 import io.jsonwebtoken.Jws; 9 import…… Continue reading Creating and Parsing a asymmetric key signed JWT containing claims
AssertTimeout Example
In this post under Junit, I will show with example how to use and what is the purpose of AssertTimeout assertion method. AssertTimeout is used to verify whether a certain operation completes within the specified timeout or not. For our example we will use the below class to be tested. Class to be tested package…… Continue reading AssertTimeout Example
Creating and Parsing a asymmetric key signed JWT containing payload
In this post under JJWT, I will show with example how to create and parse asymmetric key signed JWT containin payload. The JWT can contain claims or payload. For our example we will use a JWT containing payload. Below is the complete code for your reference Main code 1 package defaultPackage; 2 import java.security.KeyPair; 3…… Continue reading Creating and Parsing a asymmetric key signed JWT containing payload