springcloud网关路由到网关内部的servlet路径

时间:2018-09-29 06:47:38

标签: spring-cloud-gateway

每个人 现在,我在springcloud网关中有配置application.yml。 例如:

class BaseClass : IDisposable {

   MyDisposeableObject disposeMe; // object with Dispose/Finalize
   Dictionary<string,int> anotherObject; // just some arbitrary other object

   bool disposed = false;

   public BaseClass() {
      disposeMe = new MyDisposeableObject();
      anotherObject = new Dictionary<string,int>();
   }

   public void Dispose() { 
      Dispose(true);
      GC.SuppressFinalize(this);           
   }

   protected virtual void Dispose(bool disposing) {
      if (disposed)
         return; 

      if (disposing) {
         // Free any other managed objects here.
         // Should I use "disposeMe.Dispose()" here?
      }

      // Free any unmanaged objects here.
      // OR should I use "disposeMe.Dispose()" here?

      // Also should I be doing anything with "anotherObject"?

      disposed = true;
   }

   ~BaseClass() {
      Dispose(false);
   }
}

当我请求http://localhost:8080/hello/print时,网关可以路由到微服务“ mshello”,并通过eureka从mshello获得响应。

但是,我请求http://localhost:8080/druid时,我无法从网关获得响应。路径“ / druid”是网关应用中的servlet。

请帮助我 谢谢!

0 个答案:

没有答案