generated from telekom/reuse-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add default, low prio noopSchemaStore into AutoConfiguration
- Loading branch information
1 parent
83969ec
commit 3b9a220
Showing
4 changed files
with
39 additions
and
57 deletions.
There are no files selected for viewing
14 changes: 0 additions & 14 deletions
14
...on-core/src/main/java/de/telekom/eni/pandora/horizon/cache/schema/SchemaCacheService.java
This file was deleted.
Oops, something went wrong.
42 changes: 0 additions & 42 deletions
42
...java/de/telekom/eni/pandora/horizon/autoconfigure/cache/SchemaCacheAutoConfiguration.java
This file was deleted.
Oops, something went wrong.
38 changes: 38 additions & 0 deletions
38
...in/java/de/telekom/eni/pandora/horizon/autoconfigure/schema/SchemaStoreConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Copyright 2024 Deutsche Telekom IT GmbH | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package de.telekom.eni.pandora.horizon.autoconfigure.schema; | ||
|
||
import de.telekom.eni.pandora.horizon.schema.SchemaStore; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.everit.json.schema.Schema; | ||
import org.springframework.boot.autoconfigure.AutoConfigureOrder; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.core.Ordered; | ||
|
||
@Configuration | ||
@Slf4j | ||
public class SchemaStoreConfiguration { | ||
|
||
@ConditionalOnMissingBean({SchemaStore.class}) | ||
@AutoConfigureOrder(Ordered.LOWEST_PRECEDENCE) | ||
@Bean | ||
public SchemaStore noOpSchemaStore() { | ||
return new SchemaStore() { | ||
@Override | ||
public Schema getSchemaForEventType(String environment, String eventType, String hub, String team) { | ||
log.debug("SchemaCacheService is not implemented, returning null"); | ||
return null; | ||
} | ||
|
||
@Override | ||
public void pollSchemas() { | ||
log.debug("SchemaCacheService is not implemented"); | ||
} | ||
}; | ||
} | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
...esources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
de.telekom.eni.pandora.horizon.autoconfigure.HorizonAutoConfiguration | ||
de.telekom.eni.pandora.horizon.autoconfigure.KubernetesClientConfiguration | ||
de.telekom.eni.pandora.horizon.autoconfigure.cache.SchemaCacheAutoConfiguration | ||
de.telekom.eni.pandora.horizon.autoconfigure.schema.SchemaStoreConfiguration |