@@ -33,6 +33,7 @@ import org.springframework.cloud.stream.schema.server.support.AvroSchemaValidato
|
|||||||
import org.springframework.cloud.stream.schema.server.support.SchemaValidator;
|
import org.springframework.cloud.stream.schema.server.support.SchemaValidator;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.Import;
|
||||||
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,6 +43,7 @@ import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
|||||||
@Configuration
|
@Configuration
|
||||||
@EnableJpaRepositories(basePackageClasses = SchemaRepository.class)
|
@EnableJpaRepositories(basePackageClasses = SchemaRepository.class)
|
||||||
@EnableConfigurationProperties(SchemaServerProperties.class)
|
@EnableConfigurationProperties(SchemaServerProperties.class)
|
||||||
|
@Import(ServerController.class)
|
||||||
public class SchemaServerConfiguration {
|
public class SchemaServerConfiguration {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@@ -58,12 +60,6 @@ public class SchemaServerConfiguration {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
|
||||||
public ServerController serverController(SchemaRepository repository,
|
|
||||||
SchemaServerProperties schemeServerProperties) {
|
|
||||||
return new ServerController(repository, schemaValidators(), schemeServerProperties);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public Map<String, SchemaValidator> schemaValidators() {
|
public Map<String, SchemaValidator> schemaValidators() {
|
||||||
Map<String, SchemaValidator> validatorMap = new HashMap<>();
|
Map<String, SchemaValidator> validatorMap = new HashMap<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user