1 package de.juplo.kafka.chat.backend;
3 import de.juplo.kafka.chat.backend.domain.ChatHome;
4 import de.juplo.kafka.chat.backend.persistence.StorageStrategy;
5 import jakarta.annotation.PreDestroy;
6 import org.springframework.beans.factory.annotation.Autowired;
7 import org.springframework.boot.SpringApplication;
8 import org.springframework.boot.autoconfigure.SpringBootApplication;
9 import org.springframework.context.annotation.Bean;
10 import reactor.core.publisher.Flux;
13 @SpringBootApplication
14 public class ChatBackendApplication
19 StorageStrategy storageStrategy;
24 storageStrategy.writeChatrooms(Flux.fromIterable(chatHome.list()));
27 public static void main(String[] args)
29 SpringApplication.run(ChatBackendApplication.class, args);