This is one of the Holon Platform example projects.
This example shows how to setup a Holon Platform Context
scope, using Spring Boot auot-configuration, to provide context resource instances as Spring beans. This way, any valid Spring bean can be obtained as a context resource using the Holon Platform standard Context
API, for example through the static Context.get().resource(Class<T> resourceType)
method.
The holon-starter
Spring Boot starter is used.
This example addresses the following topics:
- Use the Holon Platform core Spring Boot support to auto-configure the Spring beans Context scope
- Use the
Context
API to obtain context resources
The ExampleResource interface represents the example class to be made available as a Context
resource.
The Application class is the Spring Boot starter class and shows how to use the Context
API to obtain the ExampleResource
context resource.
Run the Application
class. The following output is expected:
Message: Example resource
Message: Example resource
Message: Thread resource
The complete Holon Platform reference guide is available here.
For the specific documentation about the components used in this example see:
The Holon Platform is built using Java 8, so you need a JRE/JDK version 8 or above to build and run this example projects.
All the Holon Platform modules and examples are Open Source software released under the Apache 2.0 license.
See Holon Platform Examples for the examples directory.