A tour of Spring dependency injection styles
Switch branches/tags
Pull request Compare This branch is 2 commits behind cbeams:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
gradle/wrapper
slides
style-0-nospring/src
style-1-xml
style-2-namespace
style-3-autowired
style-4-javaconfig
style-5-hybrid
.gitignore
README.md
build.gradle
gradlew
gradlew.bat
settings.gradle
showoff.json

README.md

Very simple projects containing the same application configured in different ways using Spring (and in one case without Spring at all).

Clone the repo in typical fashion, or download a zip of the sources.

Browse through the slides if you haven't already. From there, the projects are pretty much self-explanatory.

Build and test everything and run the TransferScript main methods with

gradlew run test

Import the projects into Eclipse with

gradlew eclipse

and then File->Import->Existing Projects Into Workspace. For IDEA users, it's gradlew idea.

Once you're looking at the code, just browse around. Review how DefaultTransferService works. Look at each of the following and see how they differ across projects:

  • TransferScript
  • TransferServiceTests
  • app-config.xml

Explore, experiment, have fun!