package Ġco . nil in . op ex . auth . gateway . config Ċ Ċ import Ġco . nil in . op ex . auth . gateway . Key cloak Gateway App Ċ import Ġorg . slf 4 j . Logger Ċ import Ġorg . slf 4 j . LoggerFactory Ċ import Ġorg . springframework . boot . autoconfigure . web . Server Properties Ċ import Ġorg . springframework . boot . context . event . Application Ready Event Ċ import Ġorg . springframework . context . Application Listener Ċ import Ġorg . springframework . context . annotation . Bean Ċ import Ġorg . springframework . context . annotation . Configuration Ċ Ċ @ Configuration Ċ class ĠApp Config Ġ{ ĊĠĠĠ Ġprivate Ġval ĠLOG : ĠLogger Ġ= ĠLoggerFactory . getLogger ( Key cloak Gateway App :: class . java ) ĊĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġon Application Ready EventListener ( ĊĠĠĠĠĠĠĠ Ġserver Properties : ĠServer Properties , ĊĠĠĠĠĠĠĠ Ġkey cloak Server Properties : ĠKey cloak Server Properties ĊĠĠĠ Ġ): ĠApplication Listener < Application Ready Event > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠApplication Listener < Application Ready Event > Ġ{ Ġevt Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġport Ġ= Ġserver Properties . port ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġkey cloak Context Path Ġ= Ġkey cloak Server Properties . context Path ĊĠĠĠĠĠĠĠĠĠĠĠ ĠLOG . info (" Embedded ĠKey cloak Ġstarted : Ġhttp :// localhost :{} {} Ġto Ġuse Ġkey cloak ", Ġport , Ġkey cloak Context Path ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ