How to create new Git Repository and host it in Bitbucket

What is Git ? While working in a team which involves multiple developers,it is very much necessary to use a Version Control System. Version Control System is basically a Software using which – Multiple developers can put their code in(Check In). – Take (Check Out) the code of fellow Software developers. – See the version history of the files(Who committed ...

Read More »

Focus on the Basics: The Art of Mastering Scrum

Strict adherence to the rules of Scrum can lead us astray. To master scrum, we must learn to unlearn. Focusing more on the principles than the rules is what makes truly effective scrum teams. Many software teams practice Agile development. Agile is simply a set of values and principles for software development. Its main aim is to make software teams ...

Read More »

Java Command-Line Interfaces (Part 15): Jargo

Jargo is defined on its main GitHub page as “a tool to ease the handling of program arguments/options.” That page provides a Rationale for another command line processing library when so many others already exist and the top of that list is, “Because type-safety, immutability and readability matters.” Jargo’s options “definition” stage uses generic typed instances of the Argument class. ...

Read More »

Applying HATEOAS to a REST API with Spring Boot

spring-interview-questions-answers

HATEOAS is an acronym for Hypermedia As The Engine Of Application State. Even after expanding that for you it still might not mean a lot. HATEOAS is an extra level upon REST and is used to present information about the REST API to the client, allowing for a better understanding of the API without the need to bring up the ...

Read More »

Securing resources using Spring Security with OAuth

spring-interview-questions-answers

1. Introduction In this tutorial, we will check out how we can use Spring Security with OAuth to secure the admin resources on the server based on the path pattern (/api/**). Another path pattern (/oauth/token) we have configured which will help configured authorization server generate the access token. Note that we will be using Password Grant Type in this demo ...

Read More »

Java 8 – Sorting HashMap by values in ascending and descending order

In the last article, I have shown you how to sort a Map in Java 8 by keys and today, I’ll teach you how to sort a Map by values using Java 8 features e.g. lambda expression, method reference, streams, and new methods added into the java.util.Comparator and Map.Entry classes. In order to sort any Map e.g. HashMap, Hashtable, LinkedHashMap, TreemMap, or even ConcurrentHashMap, ...

Read More »

Building a RESTFul Service using Spring Boot

java-interview-questions-answers

Everyone is talking about Microservices such as WSO2 Microservice Framework, Spring Boot, etc. Since I haven’t worked on any Spring related project since a very long time, I thought to implement a simple RESTFul service using Spring Boot. So I started with Spring documentation. It is straightforward.  You can create the structure of your project using “Spring Initializr“. This is an online ...

Read More »

Fixed-rate vs. fixed-delay – RxJava FAQ

If you are using plain Java, since version 5 we have a handy scheduler class that allows running tasks at fixed rate or with fixed delay: import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(10); Basically it supports two types of operations: scheduler.scheduleAtFixedRate(() -> doStuff(), 2, 1, SECONDS); scheduler.scheduleWithFixedDelay(() -> doStuff(), 2, 1, SECONDS); scheduleAtFixedRate() will make sure doStuff() is invoked precisely every second ...

Read More »