Skip to content

v1 06. Application Context

Frank Hossfeld edited this page Nov 28, 2019 · 1 revision

Application Context

The application context is a class, which will be instantiated by the framework and injected in every controller, filter, handler and the loader. All controllers, handlers, filters and the loader will have access to the same instance.

This is a good place to store informations that should be application wide available.

The context is a required attribute of the Application-annotation.

@Application(loader = MyApplicationLoader.class,
             startRoute = "/applicationShell/application/search",
             context = MyApplicationContext.class,
             routeError = "/errorShell/error")
interface MyApplication
  extends IsApplication {
}