Sunshower-Arcus is the collection of common libraries underlying most of Sunshower.io. Arcus provides utilities for:
- Distributed configuration
- Tenancy-aware transaction-routing
- high-performance, index-sympathetic database IDs integrated with technologies like Hibernate/JPA and JAX-RS
- Multitenancy
- Security
Annotating a configuration class with @io.sunshower.arcus.config.Configure(ConfigurationClass.class)
will
create an injectable, statically-typed configuration object. Intrinsically-supported formats are:
- JSON
- XML
- YAML
but adding support for a new format is as simple as implementing io.sunshower.arcus.config.ConfigurationReader
,
adding the configuration reader implementation to META-INF/services/io.sunshower.arcus.config.ConfigurationReader
,
and placing the implementation on the runtime classpath of the consuming project.
Given a class with the simple-name ExampleConfiguration
, Arcus will search:
- The system environment for a
ARCUS_EXAMPLE_CONFIGURATION
environment variable pointing to the desired configuration - The system properties for
configuration.example-configuration
pointing to the desired configuration - The classpath for
classpath:/configuration/example-configuration.{ext}
where{ext}
is any extension contributed by aConfigurationReader
available on the classpath