TMP
[demos/kafka/chat] / src / main / java / de / juplo / kafka / chat / backend / storage / nostorage / NoStorageStorageConfiguration.java
1 package de.juplo.kafka.chat.backend.storage.nostorage;
2
3 import de.juplo.kafka.chat.backend.implementation.StorageStrategy;
4 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
5 import org.springframework.context.annotation.Bean;
6 import org.springframework.context.annotation.Configuration;
7
8
9 @ConditionalOnProperty(
10     prefix = "chat.backend.inmemory",
11     name = "storage-strategy",
12     havingValue = "none",
13     matchIfMissing = true)
14 @Configuration
15 public class NoStorageStorageConfiguration
16 {
17   @Bean
18   public StorageStrategy storageStrategy()
19   {
20     return new NoStorageStorageStrategy();
21   }
22 }