OSGI Spring MVC JSP 框架
有没有一种方法可以为具有以下功能的 Web 应用程序创建一个“插件”框架:
对于开发人员而言无缝 - 可以使用现有技术
例如
- Spring MVC 注释(例如请求映射)
- Hibernate / JPA 以及注解
- JSP、JSTL 和 servlet 视图
分离 - 类加载、会话、http 上下文
例如,每个 @RequestMapping 仅限于“主”URL 的一个子集(例如,一个“插件”)无法劫持另一个“插件”的 URL 请求,例如 URL
http://localhost/rootContext/plugin1/action1?param=value
将需要相对于“模块”的映射/ "plugin" 是 "plugin1" 而不是根上下文,所以如果我们完全分离 http 上下文,我希望注释为@RequestMapping("action1"...)
还有Parent Last类加载,这样每个模块都可以有它自己的jar等..
- 还对会话对象进行保护,以避免意外覆盖会话密钥(并且出于安全考虑)
支持普通的旧 JSP
- 我发现我希望将视图技术设为 JSP它们比 Freemarker 或 Velocity 容易得多,
我想到了 Apache Felix、OSGI、Spring-OSGI MVC 等...但仍然需要更多信息...
Is there a way to create a "plug-in" framework for web applications that have these features:
Seemless for the developer - can use existing technologies
e.g.
- Spring MVC annotations (e.g. Request Mapping)
- Hibernate / JPA with annotations
- JSP, JSTL, and servlet views
Seperation - class loading, session, http context
e.g. each @RequestMapping is confined to a subset of the "main" URL (e.g. one "plugin" can't hijack the URL request of another "plugin" for example the URL
http://localhost/rootContext/plugin1/action1?param=value
will require a mapping that is relative to the "module" / "plugin" which is "plugin1" and not the root context, so if we have full seperation of http context, I expect the annotation to be@RequestMapping("action1"...)
also Parent Last classloading so each module can have it's own jars etc..
- also protection on the session object to avoid overwriting session keys accedently (and for security)
Supports plain old JSPs
- I'd like to have the view tehnology be JSPs, I find them much easier than Freemarker, or Velocity
I thought of Apache Felix, OSGI, Spring-OSGI MVC etc... but still need more information...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
仔细看看 Eclipse Virgo,它可能是目前想要包含的新建项目的最佳选择Spring 和 JSP。
Take a closer look at Eclipse Virgo, possibly the best choice for greenfield projects for the moment which want to include Spring and JSP.