package Ġru . k uch an ov . gp Ċ Ċ import Ġorg . slf 4 j . Logger Ċ import Ġorg . slf 4 j . LoggerFactory Ċ import Ġorg . springframework . boot . Spring Application Ċ import Ġorg . springframework . boot . autoconfigure . SpringBoot Application Ċ import Ġorg . springframework . boot . builder . Spring Application Builder Ċ import Ġorg . springframework . boot . web . servlet . Servlet Listener Registration Bean Ċ import Ġorg . springframework . boot . web . servlet . support . SpringBoot Servlet Initializer Ċ import Ġorg . springframework . context . annotation . Bean Ċ import Ġorg . springframework . scheduling . annotation . Enable Scheduling Ċ import Ġjavax . servlet . http . Http Session Event Ċ import Ġjavax . servlet . http . Http Session Listener ĊĊ Ċ @ SpringBoot Application Ċ @ Enable Scheduling Ċ class ĠApplication Ġ: ĠSpring Boot Servlet Initializer () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġconfigure ( application : ĠSpring Application Builder ): ĠSpring Application Builder Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġapplication . sources ( Application :: class . java ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġsession Listener (): ĠServlet Listener Registration Bean < Http Session Listener > Ġ= ĊĠĠĠĠĠĠĠ ĠServlet Listener Registration Bean ( object Ġ: ĠHttp Session Listener Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġoverride Ġfun Ġsession Created ( se : ĠHttp Session Event ?) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġsuper . session Created ( se ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġse ?. session ?. max Inactive Interval Ġ= Ġ 6 0 Ġ* Ġ 6 0 Ġ* Ġ 2 4 Ġ* Ġ 7 Ġ// one Ġweek ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ}) ĊĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġlogger (): ĠLogger Ġ= ĊĠĠĠĠĠĠĠ ĠLoggerFactory . getLogger (" application ") Ċ } Ċ Ċ fun Ġmain ( args : ĠArray < String >) Ġ{ ĊĠĠĠ ĠSpring Application . run ( Application :: class . java , Ġ* args ) Ċ } Ċ