Class AppConfig
- java.lang.Object
-
- com.palmer.billingstatementgenerator.util.AppConfig
-
public final class AppConfig extends java.lang.ObjectUtility class for loading application configuration from an external properties file. On startup, loadsconfig.propertiesfromresources/com/palmer/billingstatementgenerator/properties/relative to the working directory and registers all entries as system properties, making them available throughout the application viaSystem.getProperty(String).If the config file does not exist, default values are used for all settings.
Example
config.properties:wfh.sales.tax.rate=0.0825
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.math.BigDecimalgetSalesTaxRate()Returns the configured sales tax rate as aBigDecimal.
-
-
-
Method Detail
-
getSalesTaxRate
public static java.math.BigDecimal getSalesTaxRate()
Returns the configured sales tax rate as aBigDecimal. Reads from the system propertywfh.sales.tax.rate, defaulting to0.00if not set or if the value cannot be parsed.- Returns:
- the sales tax rate (e.g.
0.0825for 8.25%)
-
-