Author Archives
-
Different ways of declaration and initialization of arrays in Java
The below code shows the different ways one can declare and initialize an Array in Java: Line 5: Declaration of array along with initialization of its values. Here it is not required to pass the size of the array. Line… Read More ›
-
Testing the File Upload API in Spring Boot
In one of my previous post, I had created an API to upload file. In this post I will write a JUnit test to test the API. We will test the complete flow right from uploading till it is copied… Read More ›
-
Upload files in Spring Boot application using Commons FileUpload
In our previous post, we saw how to upload a file using the Spring framework’s default implementation for MultipartFile interface. In this post, we will see how we can use the Commons FileUpload library and the wrapper implementation CommonsMultipartFile provided… Read More ›
-
Uploading files in Spring Boot application
Uploading files is one of the most common operations in a web application. In this article we will look at how to upload file from an HTML page and copy it to the file system on the server. Creating a… Read More ›
-
How to use regular expression in Java?
Regular expressions are very important tool for seraching in text. Below is the code snippet for executing regex search and capturing different parts of the string based on the regular expression The groups are captured by using (). In the… Read More ›
-
How to parse number string with commas to Integer or Long?
Below is the code used for parsing number string with commas to Integer or Long
-
Using Websocket with Spring Framework and Vuejs
Websockets are full duplex (persistent) connections between client and server such that both can share information with each other without the need for repeatedly establishing a new connection. This removes the need for repeated polling from the client to get… Read More ›
-
Advanced profile management in Spring Boot
We all are aware of profile management in Spring Boot and the flexibility it provides in configuring our applications for different environments. The other powerful aspect of this is that at any given time we can have multiple active profiles…. Read More ›
-
JDK 14 – JEP 361 Switch Expressions out from preview
In my previous post, I wrote about switch expressions and related enhancements released as a preview feature for JDK 12. Subsequently, in JDK 13 there were some changes proposed, like using yield keyword to return value from the switch block… Read More ›
-
JEP 355 Text Blocks in JDK 13
JDK 13 went GA on September 17th, 2019 and the prominent new features are listed here. One of the new features is “text blocks”. This allows writing multiline strings easily without the need for concatenation while splitting into different lines…. Read More ›