Spring JavaConfig PetClinic Sample ApplicationFor those that are familiar with Spring's PetClinic application, this sample is functionally identical with one key configuration change: All the XML files are gone! (well, all the Spring XML files anyway - onlyweb.xml remains).
PetClinic comes ready to build via Maven and deploy to Tomcat or any servlet container of your choosing. Also, the project is equipped with Eclipse WTP metadata that will allow for easy deployment to a server instance within your IDE. PetClinic is now bundled with the 1.0.0.M4 release distributable, but in the meantime you can follow the simple instructions below to grab it from source.
The configuration is documented via Javadoc (it is JavaConfig after all...), so read up in the org.springframework.samples.petclinic.config package, starting with PetclinicApplicationConfig. Also be sure to take a look at web.xml to see how the @Configuration classes are bootstrapped.
Please provide any feedback or problems via comments on JIRA issue SJC-76. Thanks!
# check out svn co https://src.springframework.org/svn/spring-javaconfig/trunk/samples/org.springframework.config.java.samples.petclinic cd org.springframework.config.java.samples.petclinic # build mvn package # deploy cp target/petclinic.war $TOMCAT_HOME/webapps Note that if you plan to import PetClinic into Eclipse, you'll want to have the latest m2eclipse plugin installed first. Update URL at http://m2eclipse.sonatype.org/update/ Simple Maven2-based application configured with JavaConfigThis very basic application demonstrates the bare minimum config with Maven+Spring JavaConfig to get up and running.svn co https://src.springframework.org/svn/spring-javaconfig/trunk/samples/maven-demo cd maven-demo mvn clean test |
|







