sal ‧ u ‧ ta ‧ ry /ˈsæljət ə ri, ˈsæljʊt ə ri $ -teri/ BrE AmE adjective formal
[ Date: 1400-1500 ; Language: French ; Origin: salutaire , from Latin salutaris , from salus ; ⇨ ↑ salute 1 ]
a salutary experience is unpleasant but teaches you something
salutary experience/lesson/reminder etc
Losing money in this way taught young Jones a salutary lesson.