What is the Across bootstrap?

The Across bootstrap is the actual starting of the application. During the bootstrapping phase the entire Spring ApplicationContext hierarchy of an application is created.

A typical Across application has the following bootstrap phases:

1. The root ApplicationContext is scanned, which includes the configuration of the Across context (represented by the @AcrossApplication annotation).

2. The AcrossContext bean is created as early as possible:

  • the Across context configuration is analyzed and the modules are ordered according to their dependencies;
  • the different module descriptors are offered a chance to customize the Across context configuration;
  • the parent Across ApplicationContext is created to serve as parent for the ApplicationContext of individual modules;
  • every module creates its own ApplicationContext in the order assigned by the Across context;
  • exposed beans are pushed up the ApplicationContext hierarchy as far as possible.

3. Other beans in the root ApplicationContext are created; these can optionally use exposed components from the Across modules.

4. The root ApplicationContext returns and is ready to be used. In case of a Spring Boot application, the Spring ApplicationReadyEvent gets published.

Several Across events are published during bootstrap, allowing modules to interact with each other.

See the reference documentation section on the Across bootstrap for more details.