Skip to Main Content
Spring: A Developer's Notebook
book

Spring: A Developer's Notebook

by Bruce Tate, Justin Gehtland
April 2005
Intermediate to advanced content levelIntermediate to advanced
216 pages
4h 44m
English
O'Reilly Media, Inc.
Content preview from Spring: A Developer's Notebook

Automating the Example

It's time for a little housekeeping. To go much further, you need to automate. You probably already use Ant. It's a standardized way to organize all of the tasks that you need to build your application. If you don't already use it, you need to.

Ant has become ubiquitous. In order to work with Java tools, you need to be able to speak the language. We're not going to provide yet another justification for Ant in this chapter, since you've probably read enough of them already.

How do I do that?

You'll need to download an Ant distribution. You may as well use the one that comes with Spring (http://springframework.org/ ). To run all of the examples for this book, you'll want to get Spring version 1.1, or later. Follow all of the directions for your platform.

Next, you'll organize the directory structure in a way that's friendly for web applications and Spring. I recommend that you use the organization that you'll find with the Spring sample applications, so that you'll have a working example. These are the directories that you'll use:

src

This directory has the home for all of the source code in your application. As usual, you'll want the directory structure to mirror your package structure.

test

This directory has the home for all of your unit tests. We'll talk more about JUnit in the last lab.

db

This directory has the home for all database specific scripts, configuration, and code. Some of these will be configuration files, some will help set up a database with ...

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

JavaBeans Unleashed

JavaBeans Unleashed

Dr. Donald Doherty, Rick Leinecker
Beginning Spring

Beginning Spring

Mert Caliskan, Kenan Sevindik, Rod Johnson, Jürgen Höller
Hibernate Search in Action

Hibernate Search in Action

Emmanuel Bernard, John Griffin

Publisher Resources

ISBN: 0596009100Supplemental ContentErrata Page