Spring Rich Client Platform: PetClinic
I'm already decided to use Spring IoC in MR7. What I'm considering is Spring RCP. The motivation is to build the UI tier faster and also Spring RCP provisions - components and included/integrated libraries like JGoodies.
Althought here and there you can find some blog post describing how to start with Spring RCP, it took me some time to run PetClinic, so you might find this description useful...
Documentation:
Althought here and there you can find some blog post describing how to start with Spring RCP, it took me some time to run PetClinic, so you might find this description useful...
- Prerequisite: Subversion client
Download Tortoise Subversion Client for windows (or your favorite one). - Checkout Spring RCP from the Sourceforge repository
- Create a directory e.g. c:\spring-rcp
- While in the directory you have just created, click right button, get Explorer menu and choose SVN Checkout.
- Set SVN repository URL:
https://svn.sourceforge.net/svnroot/spring-rich-c/trunk/spring-richclient/
and directory where to checkout. - Proceed to the checkout by clicking OK.
- Build the project
- Download and install Maven 2 (configure your PATH environment variable to run mvn from anywhere).
- Change to the root directory of the Spring RCP checkout (in our example it is c:\spring-rcp)
- Run mvn install
- ...now you may get a cup of coffee ;-)
- If a repository item is not available (might happen), run mvn install again and again until it successfully finishes.
- Run PetClinic (standalone)
- Presuming that you are Eclipse developer...
- Finish Maven2 installation by defining Eclipse classpath variable M2_REPO.
- Go to Eclipse menu/Window/Preferences.../Classpath Variables. Select New... and create M2_REPO variable. It will point to the directory like C:/Documents and Settings/[user name]/.m2/repository
- Let Maven2 create Eclipse projects by running mvn eclipse:eclipse in the root of the project (c:\spring-rcp).
- Import projects to the Eclipse. Go to menu/File/Import.../Existing Project Into Workspace/ and select root directory (c:\spring-rcp). Eclipse will find several projects - import them all.
- In package explorer open spring-richclient-petclinic-standalone project, find the package src/main/java/org.springframework.richclient.samples.petclinic.
- Run PetClinicStandalone class by right click and Run as/Java Application
- When you will be asked for username/passwd, just click Cancel.
- And that's it ;-)
Documentation:
Labels: mindraider, rcp, spring