Skip to Content
Spring Boot: Up and Running
book

Spring Boot: Up and Running

by Mark Heckler
February 2021
Intermediate to advanced content levelIntermediate to advanced
325 pages
8h 15m
English
O'Reilly Media, Inc.
Book available
Content preview from Spring Boot: Up and Running

Chapter 2. Choosing Your Tools and Getting Started

Getting started creating Spring Boot apps is easy, as you’ll soon see. The most difficult part might be deciding which of the available options you’d like to choose.

In this chapter, we’ll examine some of the excellent choices you have available to create Spring Boot applications: build systems, languages, toolchains, code editors, and more.

Maven or Gradle?

Historically, Java application developers have had a few options for project build tools. Some have fallen out of favor over time—for good reason—and now we’ve coalesced as a community around two: Maven and Gradle. Spring Boot supports both with equal aplomb.

Apache Maven

Maven is a popular and solid choice for a build automation system. It has been around for quite some time, having had its beginning in 2002 and becoming a top-level project at the Apache Software Foundation in 2003. Its declarative approach was (and is) conceptually simpler than the alternatives of the time and of now: simply create an XML-formatted file named pom.xml with desired dependencies and plug-ins. When you execute the mvn command, you can specify a “phase” to complete, which accomplishes a desired task like compiling, removing prior output(s), packaging, running an application, and more:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
 https://maven.apache.org/xsd/maven-4.0.0.xsd" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building Microservices with Spring Boot, Second Edition

Building Microservices with Spring Boot, Second Edition

Josh Long / Phillip Webb
Spring Boot Fundamentals

Spring Boot Fundamentals

Bharath Thippireddy

Publisher Resources

ISBN: 9781492076971Errata PageSupplemental Content