Last updated on June 21, 2020

Java Setup

👋 Hello! Most of these notes are "knowledge in the making", so parts of them could be incomplete 🙈, inaccurate 🙉 or even potentially wrong 🙊.

This is the setup I plan to follow when setting up a Java project with Spring. As I rarely use Java for non-web stuff, the use of Spring is a given.

Use Spring Boot and to create a project.

Use spring-javaformat to prettify the code and use Spring Checkstyle coding standards. The IntelliJ IDEA plugin has to be downloaded manually and installed from a JAR file. Configure Checkstyle using the following checkstyle.xml:

<?xml version="1.0"?>
  "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
<module name="">
  <module name="io.spring.javaformat.checkstyle.SpringChecks">
    <property name="headerType" value="unchecked"/>
    <property name="projectRootPackage" value="com.example"/>

And suppress the following checks with suppressions.xml:

<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
  "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
  <suppress checks="SpringImportOrder"/>
  <suppress checks="AvoidStarImport"/>