GH-1448 Fixed ServerController override

Resolves #1448
This commit is contained in:
Oleg Zhurakousky
2019-01-22 16:13:01 +01:00
parent 630a93171c
commit c8b79eb490

View File

@@ -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.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
/**
@@ -42,6 +43,7 @@ import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
@Configuration
@EnableJpaRepositories(basePackageClasses = SchemaRepository.class)
@EnableConfigurationProperties(SchemaServerProperties.class)
@Import(ServerController.class)
public class SchemaServerConfiguration {
@Bean
@@ -58,12 +60,6 @@ public class SchemaServerConfiguration {
};
}
@Bean
public ServerController serverController(SchemaRepository repository,
SchemaServerProperties schemeServerProperties) {
return new ServerController(repository, schemaValidators(), schemeServerProperties);
}
@Bean
public Map<String, SchemaValidator> schemaValidators() {
Map<String, SchemaValidator> validatorMap = new HashMap<>();