Announcement Announcement Module
No announcement yet.
Best practice - sping jpa and spring mvc Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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,

  • #2
    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.