16 Jul

Analyze Code Quality of Java Application using SonarQube

This tutorial will show you how to analyze code quality of Java applications using SonarQube. Maintaining the quality of code is an important part of the application and it is required to find out any bugs, issues in the developed code so that we can remove any kind of vulnerabilities from the application before moving to the production.

Read More

11 Jul

Spring Boot Multi-module Project

In this example we will see how to work with multi-module spring boot application and deploy them together in embedded Tomcat server. The individual module is also deployable. In this example we have three modules email-service – responsible for sending email to the specific email address, user-service – responsible for handling user related activities and we-service – responsible for handling client request/response.

Please read the tutorial on how to create multi-module maven project

Read More

27 Jun

Creating Custom HashMap in Java

Here we will see how to create a custom HashMap uaing Java language. We have seen the built-in implementation of HashMap in Java API and we know how HashMap works and its usages.

The intention of this example is not to create a rigid HashMap that provides the same functionalities as Java API provides but to give an idea how you can create your own HashMap.

We know also how HashMap works internally and here also we will look into the internal works of HashMap with same basic functionalities.

Read More

23 Jun

Sort large File using Java

Here we will see how the huge volume of data in a file can be sorted easily.

You can use tutorial Generate File with Random Content in Java to generate a large text file.

For a smaller file whose contents fit into the memory, sorting the file programmatically can often be as simple as reading the contents of the file into memory and then writing the sorted data back into a file. But a file that is gigabytes in size (for example, 10GB in size), reading all the data into memory as required by traditional programmatic sorting may not be possible for most of the contexts.

Read More

21 Jun

Generate File with Random Content in Java

This tutorial will show you how to generate random content for creating a text file using Java technology. We will also use library wordnet-random-name to generate human friendly random identifiers.

For more information on wordnet-random-name please read https://github.com/kohsuke/wordnet-random-name

Read More

15 Jun

Spring Data JPA CRUD Example

In this tutorial we will see Spring Data JPA CRUD example. Here we will use the embedded or in-memory HSQL database. For more information on HSQL, you can find here http://hsqldb.org/

In this example we will create full annotation based Spring standalone application.

You can also find another tutorial Embedded HSQL Database in Spring Application

Read More

10 Jun

Spring MVC + AngularJS CRUD Example

In this tutorial we will see the integration of AngularJS with Spring MVC. We are going to create CRUD application using Spring REST API on server side and AngularJS is encapsulated within JSP file on client side. Thus the client will communicate with server asynchronously using AngularJS $http service.

If you need PHP version http://www.roytuts.com/angularjs-php-rest-crud-example/

If you need Codeigniter version http://www.roytuts.com/angularjs-codeigniter-rest-crud-example/

Eclipse Neon
Maven 3.3.9
Java 1.8
Spring 4.3.8.RELEASE
Jackson 2.5.3
AngularJS 1.6.4

Read More

09 Jun

Spring Asynchronous Execution using @Async

In this tutorial we will discuss about the asynchronous execution support in Spring using the @Async annotation. There are cases in which @Async is necessary to execute piece of code asynchronous. An example would be while sending a (JMS) message from one system to another system. The advantage is that the user does not have to wait for the response while the message is being send.
@Async annotation on a method of a bean will execute in a separate thread i.e. the caller does not need to wait for the completion of the called method.

Read More