= 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 link:src/main/java/org/springframework/cloud/fn/supplier/time/TimeSupplierProperties.java[TimeSupplierProperties].

== Tests

See this link:src/test/java/org/springframework/cloud/fn/supplier/time[test suite] for the various ways, this supplier is used.

== Other usage

See this https://github.com/spring-cloud/stream-applications/blob/master/applications/source/time-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application where it makes an Time Source.