Skip to content

IntelliJ IDEA useful shortcuts and tips

Here follows a short list of some IntelliJ IDEA useful shortcuts and tips to improve your productivity whilst coding Java.

Code generation

Type Alt + Insert to open the code generation dropbox, then type:

Constructors

  • Enter directly, then Up and Ctrl + Enter for no-arg constructor.
  • Enter directly, then Ctrl + A to select all of the arguments.
Read More »IntelliJ IDEA useful shortcuts and tips

Create Play Java Project

This tutorial is going to show you how to create a Play Java project using the command line build tool SBT in simple steps.

Create a Workspace

First, create a workspace in order to keep things organised:

mkdir play-workspace
cd play-workspace
Read More »Create Play Java Project

Change Spring Boot server port

Change Spring Boot server port logo


This tutorial will show you three different ways to change Spring Boot server port from its default 8080 to any other port you like.

The following steps are agnostic to your current Spring Boot’s embedded server, it should not make any difference whether you are using Tomcat, Jetty or Undertow.

Read More »Change Spring Boot server port

Change Spring Boot embedded container

Change Spring Boot embedded container logo


This tutorial will show you show to change Spring Boot embedded container from its default Tomcat, to an alternative Jetty or Undertow.

The project Spring Boot Starter Web ships with Spring MVC and a Tomcat embedded container that at build time, is packaged within the executable jar file of the standalone Spring Boot application, so everything you need to run the application including the web container itself, is included in that jar.

However, you may want to change Tomcat for another container of your choice by whatever it is the reason, so I will going to show the required steps.

Read More »Change Spring Boot embedded container

Spring Boot Hello World

Spring Boot Hello World logo


This tutorial will show you how to easily create a Spring Boot Hello World and explain a few concepts about this simple and productive tool.

Why Spring Boot?

The Spring ecosystem has become very large over the years, making it possible to to use dependency injection, create RESTful API’s, process batch jobs with database access and more, much more. However, the initial setup and sometimes the maintenance of such projects would be a bit messy with a considerable amount of different frameworks coexisting with each other.

Moreover, monolithic applications most of the time can only escalate as a whole, but not just their most frequently used features in order to improve computational resources usage.

Spring Boot comes to solve all of these problems, providing production ready stand-alone applications and convention over configuration settings, to let you start coding what really matters as fast as possible: your business logic.

Now that you know how important Spring Boot is, let’s go to the tutorial.

Pre-requisites

Read More »Spring Boot Hello World

Spring Tool Suite: Failed to load the JNI shared library

This tutorial will show you how to solve the Spring Tool Suite “Failed to load the JNI shared library” initialisation error.

spring tool suite failed to load the jni shared library error

The “Failed to load the JNI shared library” error is generally caused by two reasons:

  1. The architecture version (32 or 64 bits) of your Java and your Spring Tool Suite don’t match;
  2. Your STS.ini is pointing to your Java home directory instead of the Java executable.

Let’s explore the solutions for both cases.

Read More »Spring Tool Suite: Failed to load the JNI shared library

Install Spring Tool Suite on Eclipse

Spring logo


This tutorial will show how to install Spring Tool Suite on Eclipse and also the option to download and run the stand-alone version of the suite.

The Spring Tool Suite (STS) is an Eclipse based toolbox for Spring development, containing features such as a Boot Dashboard, support to the whole Spring ecosystem and native integration with Maven, Gradle and Git.

Pre-requisites

Read More »Install Spring Tool Suite on Eclipse