简体   繁体   English

如何使用Geoserver部署现有REST服务

[英]How to deploy existing REST service with Geoserver

In short, I want to add Geoserver extension with its own REST service (independent from the default Geoserver REST service). 简而言之,我希望使用自己的REST服务添加Geoserver扩展(独立于默认的Geoserver REST服务)。

How would you approach this problem? 你会如何解决这个问题? Should I add REST-starting servlets from the external webapp to the Geoserver sources? 我应该从外部webapp添加REST启动servlet到Geoserver源吗? If yes, where should I copy them and where should I use them? 如果是,我应该在哪里复制它们以及我应该在哪里使用它们?

I am trying to deploy my own REST service (working fine in external Spring webapp) using Geoserver, so the webapp would become obsolete and the new REST service would be visible in geoserver/rest2 path. 我正在尝试使用Geoserver部署我自己的REST服务(在外部Spring webapp中正常工作),因此webapp将变得过时,并且新的REST服务将在geoserver/rest2路径中可见。 Both Geoserver, all its services and new REST would have access to the same Geoserver user context. Geoserver,其所有服务和新REST都可以访问相同的Geoserver用户上下文。 I am trying to achieve this by adding new path-to-class mapping in applicationContext.xml in src/gs-restConfig and src/gs-rest , but starting my own REST service using Geoserver is still unsolved. 我试图通过在src/gs-restConfigsrc/gs-rest中的applicationContext.xml中添加新的路径到类映射来实现这一点,但是使用Geoserver启动我自己的REST服务仍然没有解决。 Or maybe am I trying to achieve something odd and nonsensical? 或者我可能想要实现奇怪而荒谬的事情?

Okay, I have achieved my goal by adding my own REST service to the geoserver/src/web/app project. 好的,我已经通过将自己的REST服务添加到geoserver / src / web / app项目来实现我的目标。 Maybe it's a bit extreme, but it serves my goals ;) Mainly it required adding the external (my own) REST service and related classed to the Geoserver web.xml and applicationContext.xml files. 也许它有点极端,但它符合我的目标;)主要是需要将外部(我自己的)REST服务和相关类别添加到Geoserver web.xmlapplicationContext.xml文件中。 When Geoserver is started this service coexits with Geoserver and is accessed in its path (Geoserver/rest2). 启动Geoserver时,此服务与Geoserver共存,并在其路径(Geoserver / rest2)中访问。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM