package Ġassess ments . com . power plant rest api . config Ċ Ċ import Ġassess ments . com . power plant rest api . entity . ApiKey Ċ import Ġassess ments . com . power plant rest api . repository . ApiKey Repository Ċ import Ġorg . springframework . boot . Application Arguments Ċ import Ġorg . springframework . boot . Application Runner Ċ import Ġorg . springframework . stereotype . Component Ċ Ċ @ Component Ċ class ĠApi Key Seed ers ( val ĠapiKey Repository : ĠApi Key Repository ) Ġ: ĠApplication Runner Ġ{ ĊĊĠĠĠ Ġval ĠapiKey Ġ= Ġ" a 4 db 0 8 b 7 - 5 7 2 9 - 4 ba 9 - 8 c 0 8 - f 2 df 4 9 3 4 6 5 a " ĊĊĠĠĠ Ġoverride Ġfun Ġrun ( args : ĠApplication Arguments ?) Ġ{ ĊĊĠĠĠĠĠĠĠ Ġif Ġ(! apiKey Repository . exists ById ( apiKey )) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġkey Ġ= ĠApi Key ( id Ġ= ĠapiKey ) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠapiKey Repository . save ( key ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }