Demo: typed, validated ShopProperties that fail fast
On This Lesson 3 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
build ShopProperties, see it fail on bad input; prepares JNR-012-LAB1.
Draft outline details
Step by step
- Create the
ShopPropertiesrecord and enable scanning. - Add
shop.currency,shop.tax-rate,shop.page-size-maxtoapplication.yml; inject the record into a service. - Add
devandprodprofile files with different values. - Planned mistake: set
tax-rate: 1.5; the app refuses to start. Read the message ("Binding to target ... failed") and the property name; fix the value. - Override the value with an environment variable and show it winning.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.