Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating simple crud applications in Spring based off existing database or hibernate configurations?

I'm attempting to learn Spring MVC but have been spoiled by Grails. While I am able to get a basic web application working I was wondering if there were any tools that could do some of the work to create a crud application given a database or hibernate data model? The only one I've found so far is http://www.skywayperspectives.org/portal/web/guest/downloads/overview I'm not sure how to take the generated code and convert it to use either maven or ant for it's build process.

like image 633
Jared Avatar asked Dec 02 '09 15:12

Jared


2 Answers

Telosys does this job : http://www.telosys.org

If you have a database it will use it as a model to generate the code (JPA entities, etc)

Standard templates bundles are available to generate a fully operational web application with CRUD screens

like image 157
John T Avatar answered Oct 16 '22 20:10

John T


I've never tried it but it looks like the Appfuse Maven Plugin (AMP) allows you to do this via Maven. There's a mvn appfuse:gen-model command to reverse engineer from a database and mvn appfuse:gen to create the rest of the scaffold.

I think you have to run these from within a project created with one of the Appfuse Maven archetypes. You can find the quickstart guide here to set that up.

Spring Roo has some nice scaffolding too, but it doesn't have the reverse engineering from the database you're looking for yet. Your persistence objects need to be annotated as @RooEntity objects before you can take advantage of the scaffolding with that framework.

like image 3
Jason Gritman Avatar answered Oct 16 '22 20:10

Jason Gritman