feat: Introduced config switches to choose the used implementations
authorKai Moritz <kai@juplo.de>
Wed, 11 Jan 2023 18:09:53 +0000 (19:09 +0100)
committerKai Moritz <kai@juplo.de>
Wed, 11 Jan 2023 18:24:55 +0000 (19:24 +0100)
commitb8312110fdb82d756aa953ecb02b6f220f2b6717
treee2f849149dd0fcde24e53fe7d3092f996c413d46
parent30769b731a53ce554188cb2fe5d5cdff449fd140
feat: Introduced config switches to choose the used implementations

- Switched the existing `@Configuration`-classes into an auto-configuration.
- Added a `@ConditionalOnProperty`, that loades the default-configuration.
- Added an Auto-Configuration for the `MongoDbStorageStrategy`, which is
  inactive by default and can be switched on by the property
  `chat.backend.storage` to `mongodb`.
src/main/java/de/juplo/kafka/chat/backend/ChatBackendConfiguration.java
src/main/java/de/juplo/kafka/chat/backend/persistence/inmemory/InMemoryServicesAutoConfiguration.java [new file with mode: 0644]
src/main/java/de/juplo/kafka/chat/backend/persistence/inmemory/InMemoryServicesConfiguration.java [deleted file]
src/main/java/de/juplo/kafka/chat/backend/persistence/storage/files/FilesStorageAutoConfiguration.java [new file with mode: 0644]
src/main/java/de/juplo/kafka/chat/backend/persistence/storage/files/FilesStorageConfiguration.java [deleted file]
src/main/java/de/juplo/kafka/chat/backend/persistence/storage/mongodb/MongoDbStorageConfiguration.java [new file with mode: 0644]
src/main/resources/META-INF/spring.factories [new file with mode: 0644]