Interface Groovy.Ratpack

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void bindings​(Closure<?> configurer)
      Registers the closure used to configure the BindingsSpec that will back the application.
      void handlers​(Closure<?> configurer)
      Registers the closure used to build the handler chain of the application.
      void include​(String path)
      Evaluates the path provided using the Ratpack DSL and applies the configuration to this server.
      void include​(Path path)
      Evaluates the provided path using the Ratpack DSL and applies the configuration to this server.
      void serverConfig​(Closure<?> configurer)
      Registers the closure used to build the configuration of the server.
    • Method Detail

      • include

        void include​(Path path)
        Evaluates the provided path using the Ratpack DSL and applies the configuration to this server.

        The configuration supplied by the included path are applied inline with the existing parent configuration. This allows the same semantics as specifying the configuration in a single file to be followed. For bindings(Closure), the configuration is appended. For handlers(groovy.lang.Closure<?>) and serverConfig(Closure), the configuration is merged. Settings from the parent configuration that are applied after the include, will be applied after the child configurations.

        If the path is a relative path, then it will be resolved against the location of the parent script file that is including it.

        Parameters:
        path - The absolute path to the external Groovy DSL to included into the server.
        Since:
        1.3
      • include

        void include​(String path)
        Evaluates the path provided using the Ratpack DSL and applies the configuration to this server.

        The provided string is evaluated using Paths.get(String, String...)

        Parameters:
        path - The absolute path to the external Groovy DSL to included into the server.
        Since:
        1.3
        See Also:
        include(Path)