Skip to content

Source Code Guidelines

Michelle edited this page May 10, 2019 · 3 revisions

When developing source code for SFG blog posts, please follow these guidelines:

  • Java version should focus on current LTR release (11), and Java 8 language features or higher.
  • Do provide link to complete working example in GitHub.
  • For indenting code, use spaces. (Tabs will cause problems with formatting!)
  • IntelliJ's standard code formatting is preferred. (Available in Community and Ultimate Editions)
  • Follow Google's Java Style Guide as much as practical.
  • Use the Maven Standard Directory Layout.
  • For Spring Boot projects follow the recommended project structure.
  • In source code examples, you can omit:
    • package statement (unless relevant)
    • imports (Unless important)
    • Java doc comments
    • Comments
    • Any system out statements
    • getters / setters
  • Spring Framework - Use version 5 or higher
  • Spring Boot - Use version 2 or higher.
  • Logging - prefer SLF4J
  • Testing - prefer JUnit 5
  • When coding POJOs - prefer using Project Lombok and Builder Pattern
  • Build Tools - Favor Maven, Gradle is fine. Do not use Ant or other build tools.
Clone this wiki locally