Skip to content

Latest commit

 

History

History
31 lines (17 loc) · 1.17 KB

File metadata and controls

31 lines (17 loc) · 1.17 KB

Time Supplier

This module provides a Time supplier that can be reused and composed in other applications. The Supplier uses the FastDateFormat from Apache Commons library. timeSupplier is implemented as a java.util.function.Supplier.

Beans for injection

The TimeSupplierConfiguration auto-configuration provides the following bean:

timeSupplier

You need to inject this as Supplier<String>.

You can use timeSupplier as a qualifier when injecting.

Once injected, you can use the get method of the Supplier to invoke it.

Configuration Options

All configuration properties are prefixed with time.

For more information on the various options available, please see TimeSupplierProperties.

Tests

See this test suite for the various ways, this supplier is used.

Other usage

See this README where this supplier is used to create a Spring Cloud Stream application where it makes an Time Source.