Table of Contents
PROBLEM
There are occasions when you need to define one or more variables that are shared with all project artifacts. In some cases the variable values can be changed, and in other cases the values are fixed at design-time.
SOLUTION
The Spring DSL supports Spring components (@Component) for storing a set of variables and constants, and a component has a configurable scope.
HOW IT WORKS
In order to create project level variables, the session scope should be used. Spring will make sure that any and all references to this component are to the same component instance for the duration of the HTTP session.
Session-scoped components are used:
sharing data across all project artifacts
holding configuration data
other sensitive values that should be protected