Skip to content

stivlo/spring-recipes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

To run the examples:

$ mvn compile

Load a basic bean, with property injection
$ mvn -q exec:java -Dexec.mainClass='com.apress.springrecipes.sequence.Main' -Dexec.args='Main.xml'

The same thing, with the p-schema shortcut
$ mvn -q exec:java -Dexec.mainClass='com.apress.springrecipes.sequence.Main' -Dexec.args='MainWithPSchema.xml'

List injection
$ mvn -q exec:java -Dexec.mainClass='com.apress.springrecipes.sequence.Main' -Dexec.args='ListInjection.xml'

Map injection
$ mvn -q exec:java -Dexec.mainClass='com.apress.springrecipes.sequence.Main' -Dexec.args='MapInjection.xml'

Spring MVC

Should work with Tomcat 5.5+, in Eclipse choose Run As > Run on Server, URL may change, typically on a local installation:

Simplest Servlet
http://localhost:8080/spring-recipes/welcome

Example of Search, Try with "Tennis #1", "Tennis  #2"
http://localhost:8080/spring-recipes/reservationQuery

Mapping /member/* to different class methods:
http://localhost:8080/spring-recipes/member/add
http://localhost:8080/spring-recipes/member/remove
http://localhost:8080/spring-recipes/member/delete
http://localhost:8080/spring-recipes/member/jdoe

Spring REST

Example of using a REST Service with RestTemplate
http://localhost:8080/spring-recipes/sportsnews

About

Source code examples and my tests from Spring Recipes, Second Edition - Apress, covering Spring 3.0

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages