package Ġno . nav . kl age . op pg ave . config Ċ Ċ import Ġio . micro meter . core . instrument . Meter Registry Ċ import Ġno . nav . kl age . op pg ave . util . getLogger Ċ import Ġorg . springframework . context . annotation . Bean Ċ import Ġorg . springframework . context . annotation . Configuration Ċ import Ġjavax . annotation . Pre Destroy ĊĊ Ċ @ Configuration Ċ class ĠF unk s jon elle G au ges Configuration Ġ{ ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġ@ Suppress (" JAVA _ CLASS _ ON _ COMP AN ION ") ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġlogger Ġ= Ġget Logger ( java Class . enc lo sing Class ) ĊĠĠĠ Ġ} Ċ } Ċ Ċ @ Configuration Ċ class ĠMicro meter Grace ful Shutdown Configuration Ġ{ ĊĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġregistry Closer ( registry : ĠMeter Registry ) Ġ= ĠRegistry Closer ( registry ) Ċ } Ċ Ċ class ĠRegistry Closer ( private Ġval Ġregistry : ĠMeter Registry ) Ġ{ ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġ@ Suppress (" JAVA _ CLASS _ ON _ COMP AN ION ") ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġlogger Ġ= Ġget Logger ( java Class . enc lo sing Class ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Pre Destroy ĊĠĠĠ Ġfun Ġon Destroy () Ġ{ ĊĠĠĠĠĠĠĠ Ġlogger . info (" We Ġhave Ġreceived Ġa ĠSIG TERM Ġ( ?) ") ĊĠĠĠĠĠĠĠ Ġif Ġ(! registry . is Closed ) Ġregistry . close () ĊĠĠĠ Ġ} Ċ }