Results 1 to 2 of 2

Thread: Best practice - sping jpa and spring mvc

  1. #1
    Join Date
    Jan 2013
    Posts
    2

    Question Best practice - sping jpa and spring mvc

    Hello community,

    i am playing a little bit with spring mvc and jpa cause I want to migrate a large ruby on rails (jruby) project into real java world.
    I tried sping jpa and mvc as standalone projects and was able to to get a mvc project with database support up and running with more or less trouble ;-).

    In my spring jpa project i was able to generate the entity classes without a problem, but i am missing the feature in my spring mvc project and I dont want to copy the generated classes (spring jpa) to my mvc project by hand.

    What is the best practice to combine these to projects? Should I use maven and add the jpa project as dependency, or is there another approach to do this. I am also new to maven, so I am not really sure whats also possible there.
    Or is this the total wrong direction?

    Thanks a lot!!!

    Best regards,
    Oliver

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

    Default

    You already answered the question yourself...

    If you have a project which needs classes from another project you need to declare that dependency in this case in your maven pom file.
    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

Posting Permissions

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