Skip to main content

Getting Started

  • Chapter
Pro Spring 3

Abstract

Often the hardest part of coming to grips with any new development tool is knowing where to begin. Typically, this problem is worse when the tool offers as many choices as Spring. Fortunately, getting started with Spring isn’t actually that hard if you know where to look first. In this chapter, we present you with all the basic knowledge you need to get off to a flying start. Specifically, we will look at the following:

  • Obtaining Spring: The first logical step is to obtain or build the Spring JAR files. If you want to get up and running quickly with the standard Spring distribution, simply download the latest Spring distribution from the Spring web site at www.springframework.org. However, if you want to be on the cutting edge of Spring developments, check out the latest version of the source code from Spring’s GitHub repository. If you use Maven for application development, you can simply add the dependencies for Spring into the project’s pom.xml (project object model) file, and Maven will download the JAR files for you. Please refer to the section “Spring Modules on the Maven Repository” for details.

  • Spring packaging options: Spring packaging is modular; it allows you to pick and choose which components you want to use in your application and to include only those components when you are distributing your application.

  • Spring dependencies: The full distribution of Spring includes a voluminous set of dependencies, but in many cases, you need only a subset of these dependencies. In this section, we look at which Spring features require which dependencies; this information helps you reduce the size of your application to the absolute minimum.

  • Spring samples: Spring comes with a large selection of sample applications that make ideal reference points for building your own applications. In this section, we will take a look inside the sample applications to give you a feel for the amount of sample code that is available. If you couple this with the sample application you build during the course of this book, you should have more than enough of a codebase from which to start building your own applications.

  • Test suite and documentation: One of the things members of the Spring community are most proud of is their comprehensive test suite and documentation set. Testing is a big part of what the team does. By using Clover (www.atlassian.com/software/clover), the team actively monitors the percentage of test coverage and is constantly striving to push this percentage higher. The documentation set provided with the standard distribution is also excellent.

  • Putting a spring into “Hello World!”: All bad punning aside, we think the best way to get started with any new programming tool is to dive right in and write some code. We are going to look at some simple examples, including a full DI-based implementation of everyone’s favorite, “Hello World!” Don’t be alarmed if you don’t understand all the code examples right away; full discussions follow later in the book.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 49.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Clarence Ho and Rob Harrop

About this chapter

Cite this chapter

Ho, C. (2012). Getting Started. In: Pro Spring 3. Apress. https://doi.org/10.1007/978-1-4302-4108-9_2

Download citation

Publish with us

Policies and ethics