Spring/Hibernate Entity Management Web Interface/UI

别等时光非礼了梦想. 提交于 2019-12-03 07:42:35
Aravind R. Yarram

Naked Objects, OpenXava and Spring Roo, all can do what you are looking for.

Looks like LightAdmin pluggable administration interface for Spring/JPA based applications would be a good choice for you. It has a built-in Java DSL for interface configuration and the only thing you need to do is to download a jar or declare Maven dependency, enable your domain administration through web.xml (point to package containing your JPA entities) and create @Administration configuration for the entity.

Here is an example of configuration:

@Administration( User.class )
public class UserAdministration {

  public static EntityMetadata configuration(EntityMetadataBuilder configurationBuilder ) {
    return configurationBuilder.nameField( "firstname" ).build();
  }

  public static ScreenContext screenContext( ScreenContextBuilder screenContextBuilder ) {
    return screenContextBuilder
           .screenName( "Users Administration" )
           .menuName( "Users" ).build();
  }

  public static FieldSet listView( final FieldSetBuilder fragmentBuilder ) {
    return fragmentBuilder
           .field( "firstname" ).caption( "First Name" )
           .field( "lastname" ).caption( "Last Name" ).build();
  }

I'd try Grails to do this. It's built for fast development of CRUD web applications. It's based on Groovy, Spring, and Hibernate.

To elaborate on @duffymo , Grails has a bootstrapping mechanism where you can insert the reference data you need on application startup. You can write the code such that you can detect if the reference data in bootstrap and only insert if you need it; its very hands off once its done.

Its particularly elegant in the code can detect the environment in which it is running on do different things in different environments, if you need to.

Finally, if you use Grail's scaffolding machinery, it will generate default Crud screens for you. You can have CRUD operations up in running in literally minutes.

For CRUD screens generation you can use Telosys Tools.

It allows to generate web app CRUD screens from an existing database model with customizable Velocity templates : https://sites.google.com/site/telosystools/

See the tutorials : https://sites.google.com/site/telosystutorial/ (you can use Spring MVC + JPA for example)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!