package Ġpl . seed . domain Ċ Ċ import Ġorg . springframework . http . server . reactive . Server HttpRequest Ċ import Ġorg . springframework . stereotype . Service Ċ import Ġpl . seed . mail . Email Service Ċ import Ġpl . seed . mail . Hello Email Ċ import Ġpl . seed . time . Clock Ċ import Ġreactor . core . publisher . Mono Ċ Ċ @ Service Ċ class ĠSeed Service ( ĊĠĠĠ Ġprivate Ġval Ġclock : ĠClock , ĊĠĠĠ Ġprivate Ġval Ġvisitor Ip Repository : ĠVisitor Ip Repository , ĊĠĠĠ Ġprivate Ġval Ġemail Service : ĠEmail Service Ċ ) Ġ{ ĊĠĠĠ Ġfun Ġsend Email ( mail : ĠHello Email ): ĠMono < Void > Ġ= ĠMono . just ( email Service . send ( mail )). then () ĊĊĠĠĠ Ġfun Ġlog Request ( request : ĠServer HttpRequest ): ĠMono < Visitor Ip > Ġ= ĊĠĠĠĠĠĠĠ Ġvisitor Ip Repository . save ( Visitor Ip ( request . remote Address ?. address ?. host Address . toString (), Ġclock . now ())) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. then ( visitor Ip Repository . findAll (). last ()) Ċ } Ċ