类 ServletWebServerInitializedEvent

所有已实现的接口:
Serializable

public class ServletWebServerInitializedEvent extends WebServerInitializedEvent
Event to be published after the WebServer is ready. Useful for obtaining the local port of a running server.

Normally it will have been started, but listeners are free to inspect the server and stop and start it if they want to.

从以下版本开始:
2.0.0
作者:
Dave Syer
另请参阅:
  • 构造器详细资料

  • 方法详细资料

    • getApplicationContext

      public ServletWebServerApplicationContext getApplicationContext()
      Access the application context that the server was created in. Sometimes it is prudent to check that this matches expectations (like being equal to the current context) before acting on the server itself.
      指定者:
      getApplicationContext 在类中 WebServerInitializedEvent
      返回:
      the applicationContext that the server was created from