Results 1 to 5 of 5

Thread: spring 2.5 @MVC sample app

Hybrid View

  1. #1
    Join Date
    Aug 2008
    Posts
    4

    Default spring 2.5 @MVC sample app

    Hi,

    Is there a simple/sample app that shows how to use spring MVC annotations?
    Say some controllers, models, configuration; hsqldb, eclipse, maven, jetty/tomcat.
    I don't want a walkthrough, just a simple sample app. I can't find one in the 30 first results on google, yahoo, ...

    Thanks

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    Default

    Those are shipped with spring. Download the distribution and take a look at the samples.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    Aug 2008
    Posts
    4

    Default

    I must say that I am quite disappointed by those spring sample apps.
    They are not ready to use and they seem targeted to people already having good knowledge in the JEE/Spring stuff.

    There are no dependency management: am I supposed to find and download all the jars manually? Why not at least giving a pom.xml?

    The ant scripts fail:
    spring-framework-2.5.5\samples\petclinic\db\${spring.root}\lib not found.

    The view files are not "namespaced": why put all the views in the same directory? There should be "jsp/pet/", "jsp/owner/",... directories.

    jplab

  4. #4
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    Default

    I suggest checking your setup. Works fine for me.

    There are no dependency management: am I supposed to find and download all the jars manually? Why not at least giving a pom.xml?
    All the dependencies are in the lib directory in which you extraced your spring zip file. Run the build file and you should get a WAR file that is ready for deployment.


    Also regarding the namespaced, that is an opinion. Next to that they are just sample applications. Also I don't agree on your way of namespacing, it should be on an usecase base not on an object base.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  5. #5
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    They are not ready to use and they seem targeted to people already having good knowledge in the JEE/Spring stuff.
    have you read the documentation?, try first there, would be hard but try it

    Code:
    The ant scripts fail:
    spring-framework-2.5.5\samples\petclinic\db\${spring.root}\lib not found.
    ckeck the value for the bold part

    you are running the examples in which OS?
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •