How to write a Spring/JavaEE/web application installer?

天涯浪子 提交于 2019-12-14 00:27:10

问题


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).

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?


回答1:


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:

  • A page filter to stop normal site access
  • A listener to fire the appropriate installation when the web app starts. Afterwards you can unblock the site.


来源:https://stackoverflow.com/questions/2364836/how-to-write-a-spring-javaee-web-application-installer

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