java-tutorials/spring-boot-custom-starter/greeter
amit2103 f2128ad054 Bael 5249 cleanup (#4108)
* Added parent module on poms that have no parent defined

* Removed dependency reduced pom from undertow module

* [BAEL-5249] - 21.02 - pom cleanup - formatted pom.xml
2018-04-26 14:37:47 +02:00
..
src Fix test names (#1853) 2017-05-15 11:35:14 -05:00
README.md add modules for spring boot custom starter BAEL-762 (#1661) 2017-04-19 11:04:12 +02:00
pom.xml Bael 5249 cleanup (#4108) 2018-04-26 14:37:47 +02:00

README.md

Greeter App

This app takes in the user's name and messages for different times of day as configuration parameters and outptus the greeting messge. For example it will take the name John and the message for morning time as Good Morning and output the message Hello John, Good Morning.

Usage

Create and populate the class GreetingConfig, instantiate a Greeter using the GreetingConfig and use it get greeting messages:

GreetingConfig greetingConfig = new GreetingConfig();
greetingConfig.put(USER_NAME, "World");
greetingConfig.put(MORNING_MESSAGE, "Good Morning");
greetingConfig.put(AFTERNOON_MESSAGE, "Good Afternoon");
greetingConfig.put(EVENING_MESSAGE, "Good Evening");
greetingConfig.put(NIGHT_MESSAGE, "Good Night");

Greeter greeter = new Greeter(greetingConfig);
greeter.greet();