Java

How to deal with Inheritance while using Lombok builder

Today, I came across a problem and found a beautiful solution for it, which is pretty much straight forward, but the problem may occur to anyone while using the lombok library for java. So let’s look at the problem. The Problem I have a class Person, which consists of some fields. It is annotated with the @Builder annotation of lombok, so that lombok can generate Continue Reading

Http/2 Client in Java9

Hypertext Transfer Protocol (HTTP) is an application protocol that is, basically used as a request/response mechanism for data transformation. HTTP is based on the Client/Server model. Client/Server model can be explained as two computers, Client (receiver of service) and Server (provider of service) that are communicating via requests and responses. Talking about earlier HTTP which is currently, the foundation of data communication for the World Wide Web. WWW Continue Reading

Knoldus-Scala-Spark-Services

StackWalker in Java9

StackWalker was introduced in JDK9 as Stack Walking API or JEP-259.  StackWalker gives the snapshot of the stack trace of the current thread at any given point of time and has methods to walk over it. Now, we can easily filter out the information required, sort them and perform almost all the stream operations provided by Java.

Knoldus-Scala-Spark-Services

Jshell : Java REPL

A good programmer is always lazy when it comes to writing the code. They always try to complete their functionality in minimum lines of code. The same thing is expected by them when it comes to debugging or learning new features. In order to fulfil this requirement, almost every programming language has a REPL, a tool which has proved to be of great importance, especially for Continue Reading

Delete operation in Dgraph using GRPC

Deletion in dgraph is an easy operation we just have to keep few things in mind before deleting anything in dgraph. Before I explain how can we delete I am going to explain the different scenario. For example, Delete the edge Delete the node. Delete the one value in a list We will take a scenario where we have a person who has the following Continue Reading

Writing Java APIs using Apache Atlas Client

In the previous blog, Data Governance using Apache ATLAS we discussed the advantages and use cases of using Apache Atlas as a data governance tool. In continuation to it, we will be discussing on building our own Java APIs which can interact with Apache Atlas using Apache atlas client to create new entities and types in it. How to create new Entities and Types using Continue Reading

Executor and Execution Context objects in Scala

You have come here that means you know about Threads and concurrency. If you have doubts regarding this then you can read the blog on concurrency. As Thread and Runnable have been there for long as the very first generation of concurrent execution approaches in Scala. Creating a new Thread takes less computational time compared to creating a new JVM process. we cannot afford to Continue Reading

Spring-Webflux: Testing your Router Functions with WebTestClient

I recently started working on the functional approach of Spring Boot Webflux. You can explore it more on my previous blog on Spring Boot Webflux. It is a new concept and you may not find many useful blogs on it unlike for annotation based controllers. However, going with some trial and error, I have come out with how one can test its router functions along Continue Reading

Spring-Webflux: How to test your controllers using WebTestClient?

While working with Spring MVC, you might have used Spring MockMVC to perform testing of Spring web MVC controllers. MockMVC class is part of the Spring MVC test framework which helps in testing the controllers explicitly starting a Servlet container. But, this is not something which will work if you are using SpringBoot Webflux. If you have a Spring application built with Webflux, the MVC controllers can be tested using WebTestClient. Continue Reading

In Deep: The bill of materials in Maven

Lately while working with Spring WebFlux, I came across this really helpful concept of the bill of materials also known as BOM, a concept not really limited to Spring at all. BOM is one of the few ways Spring helps us forget about issues related to transitive dependencies and focus solely on our project requirements. So when we generally create a large scale project with Continue Reading

Knoldus Pune Careers - Hiring Freshers

Get a head start on your career at Knoldus. Join us!