如何编写Spring / JavaEE / Web应用程序安装程序? [英] How to write a Spring/JavaEE/web application installer?

查看:158
本文介绍了如何编写Spring / JavaEE / Web应用程序安装程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将遗留系统转换为Spring JavaEE应用程序,并且试图设计安装过程时遇到困难。基本上,当应用程序启动时,它需要检查数据库模式是否存在以及其他设置,并提示用户逐步设置它们,直到所有设置完成。 (假设用户完全不是技术性的。)

I am in the process of converting a legacy system into a Spring JavaEE application and have gotten stuck trying to design the install process. Basically when the application starts up, it needs to check whether the database schema exists and other settings and prompt the user to set them step-by-step until everything is setup. (User is assumed to be entirely non technical).

这个过程并不适合Spring MVC风格的webapp,我认为他们的Webflow可能完全过度杀伤(和仅用于安装程序)。有关体面设计模式或框架的任何想法吗?

This process doesn't really fit with a Spring MVC style webapp and I think their Webflow might be utter overkill (and only used for the installer). Any thoughts as to decent design pattern or framework to do this?

推荐答案

对于我的一个开源项目,我写了一个基本的JavaEE Web安装程序。它可以在这里找到: https://github.com/chotchki/pgGallery

For one of my Open Source projects I have written a basic JavaEE Web Installer. It can be found here: https://github.com/chotchki/pgGallery

简而言之,要编写安装程序,您需要以下内容:

In short to write the installer you need the following:


  • 用于停止正常网站访问的页面过滤器

  • 在Web应用程序启动时触发相应安装的侦听器。之后您可以取消阻止该网站。

这篇关于如何编写Spring / JavaEE / Web应用程序安装程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆