Announcement Announcement Module
Collapse
No announcement yet.
Is there any good sample about spring? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is there any good sample about spring?

    I'll be developing a web app using Spring, but I am a new to it.
    I was planning on studying jpetstore first, but when I downloaded the code, I did know how to startup. I think maybe it is difficult for a new one.

    So is there any tutorial about jpetstore or good(simple) sample about spring?

    Thanks in advance.

  • #2
    I was planning on studying jpetstore first, but when I downloaded the code, I did know how to startup.
    Take a look at the readme.txt

    I think maybe it is difficult for a new one.
    Shouldn't be. I'll post a summary in a bit.

    Comment


    • #3
      This is all in the readme, but basically it only takes a few steps to deploy. You won't find much simpler.

      Code:
      cd spring-framework-1.2.5/samples/jpetstore
      ant warfile
      cp dist/jpetstore.war CATALINA_HOME/jakarta-tomcat-5.0.28/webapps
      cd cd db/hsqldb/
      ./server.bat
      catalina.bat start
      Point browser at: http://localhost:8080/jpetstore/

      Comment


      • #4
        I have deployed it successfully.

        I mean how do I understand the code and the architecture?

        I hava a book <<expert one-on-one J2EE Development without EJB>>.
        I must read the book fully?

        Thanks!

        Comment


        • #5
          I mean how do I understand the code and the architecture?
          Which part?
          • Spring MVC
            Inversion of Control
            Persistence
            Transaction Management
            Remoting

          I must read the book fully?
          Maybe eventually, but it depends on what you understand already. Read the readme.txt and probably start by reviewing the web.xml which configures the application context:
          Code:
          	<context-param>
          		<param-name>contextConfigLocation</param-name>
          		<param-value>
          			/WEB-INF/dataAccessContext-local.xml  /WEB-INF/applicationContext.xml
          		</param-value>
          		<!--
          		<param-value>
          			/WEB-INF/dataAccessContext-jta.xml  /WEB-INF/applicationContext.xml
          		</param-value>
          		-->
          	</context-param>
          You should then read these XML files. If any of it is unclear, then refer to the books and reference manual.

          Comment


          • #6
            I think I have found a way to learn it now by reading these xml files!
            Thanks a lot!

            Comment


            • #7
              I think I have found a way to learn it now by reading these xml files!
              Cool.

              Thanks a lot!
              No problemo. Glad I could help.

              Comment


              • #8
                By the way, which tools I can use to develop? Eclipse or other?

                Comment


                • #9
                  By the way, which tools I can use to develop? Eclipse or other?
                  I use Eclipse to develop, although I make sure I can do everything (pretty much) from the command line as well. It should do all you want, but I've heard good things about IntelliJ.

                  I've found the Web/J2EE Tools plugin pretty much mature enough to use too.

                  Comment


                  • #10
                    You might find Tyler Pitchford's Hibernate / Spring / Middlegen / XDoclet Tutorial v1.5 tutorial to be useful. It uses Eclipse.

                    Comment


                    • #11
                      You might find Tyler Pitchford's Hibernate / Spring / Middlegen / XDoclet Tutorial v1.5 tutorial to be useful. It uses Eclipse.
                      It's very userful. I think I can build a developing environment now!
                      Thank you!

                      Comment

                      Working...
                      X