Author: gauthamkarthik534
-
Java Streams anyMatch vs Streams noneMatch
In this tutorial, we will see the small difference between anyMatch and noneMatch method in streams java. Lets say you have integer array and you want to see a particular number presented in array or not. For same requirement if we use noneMatch will return false. That mean something is matching. Here is full video…
-
Streams Summary Statistics in Java
First thing to remember summaryStatistics is only applicable for integer array/List not for strings. This will provide summary information of integer list/array like min element,max element, sum ,count and avaerage. Tutorial :
-
5 Different Ways To Sum All Elements in Array Java
Approach 1: 1)Take Stream Object on Array then apply sum method directly. Approach 2: 2)Take Stream Object on array then apply reduce method by passing lambda expression. Approach 3 : 3) Take Stream Stream object based on array then apply reduce method by passing method referencing in java Approach 4: 4) Create IntStream from array…
-
Print Only Odd Numbers in Array Using Streams in Java
In this article, I will explain how to print only even numbers from integer array using streams in java. 1)Lets take numbers array and initialize with some values 2)Then Arrays.stream(numberArray) with give you stream object. There you have lots of methods. Since we need to filter only odd numbers we can apply filter method with…
-
Print Only Even Numbers in Array Using Streams in Java
In this article, I will explain how to print only even numbers from integer array using streams in java. 1)Lets take numbers array and initialize with some values 2)Then Arrays.stream(numberArray) with give you stream object. There you have lots of methods. Since we need to filter only even numbers we can apply filter method with…
-
Read From Properties File Spring Boot Using @value
In this article , we will learn how to read values from properties file using @value annotation in spring boot. Suppose you have kept some fields like this in application.properties file to get key field value, we can use @Value(“${key:someDefault}”)private String key; Here we have used Default value as well. This is good practise. Just…
-
Send and Receive Messages from Azure Queue Storage in Spring Boot
In our previous tutorial we have learnt, how to connect with azure queue storage with spring boot using Queue client. Here is the link for article. https://kbtutorials.in/2024/04/08/connect-to-azure-queue-storage-in-spring-boot/ Now we will learn , How to send and receive message from azure storage queue using queue client in spring boot. Send Message: We have method called sendMessage(text)…
-
Connect To Azure Queue Storage in Spring Boot
In my previous video , we have explained the steps to create queue storage in azure portal . If you not created please follow the steps here-https://kbtutorials.in/2024/03/30/steps-to-create-azure-storage-account/ Here are the steps : 1)Please create a spring boot application if not presented –https://start.spring.io/ 2)Add below dependencies – <dependency><groupId>com.azure.spring</groupId><artifactId>spring-cloud-azure-dependencies</artifactId><version>5.10.0</version><type>pom</type><scope>import</scope></dependency><!– https://mvnrepository.com/artifact/com.azure/azure-storage-queue –><dependency><groupId>com.azure</groupId><artifactId>azure-storage-queue</artifactId><version>12.20.2</version></dependency> 3) We are going to use…
-
liquibase circular reference detected in spring boot
When you are configuring liquibase with spring boot for first time ,you may face this circular reference exception in your spring boot application. I will suggest 2 working solutions for this problem
-
Steps to Create Azure Storage Account
First we need to create Queue Storage Queue in Azure portal. I hope you have already created it. If not lets create it first using below minimum steps. 3. Click on Create , provide subscription name and storage account name. 4. Click on Next .. Until Encryption section. 5. Enable support for customer managed keys,…