Schema Registry Property Migration
- Schema registry property migration to spring.cloud.stream prefix - Other cleanup in Schema Registry Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2687
This commit is contained in:
@@ -25,7 +25,7 @@ import org.springframework.util.Assert;
|
||||
* @author Sercan Karaoglu
|
||||
* @author Christian Tzolov
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "spring.cloud.schema.avro")
|
||||
@ConfigurationProperties(prefix = "spring.cloud.stream.schema.avro")
|
||||
public class AvroMessageConverterProperties {
|
||||
|
||||
private boolean dynamicSchemaGenerationEnabled;
|
||||
|
||||
@@ -54,20 +54,20 @@ public class AvroSchemaWithMultipleRecordsTest {
|
||||
@Test
|
||||
public void schemaLocationWithMultipleRecords() throws Exception {
|
||||
testMultipleRecordsSchemaLoading("avroSchemaRegistryClientMessageConverter",
|
||||
"--spring.cloud.schema.avro.schema-locations=classpath:schemas/user1_multiple_records.schema");
|
||||
"--spring.cloud.stream.schema.avro.schema-locations=classpath:schemas/user1_multiple_records.schema");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void schemaImportWithMultipleRecords() throws Exception {
|
||||
testMultipleRecordsSchemaLoading(
|
||||
"avroSchemaRegistryClientMessageConverter",
|
||||
"--spring.cloud.schema.avro.schema-imports=classpath:schemas/user1_multiple_records.schema");
|
||||
"--spring.cloud.stream.schema.avro.schema-imports=classpath:schemas/user1_multiple_records.schema");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void schemaLocationWithMultipleRecords2() throws Exception {
|
||||
testMultipleRecordsSchemaLoading("avroSchemaMessageConverter",
|
||||
"--spring.cloud.schema.avro.schema-locations=classpath:schemas/user1_multiple_records.schema");
|
||||
"--spring.cloud.stream.schema.avro.schema-locations=classpath:schemas/user1_multiple_records.schema");
|
||||
}
|
||||
|
||||
private void testMultipleRecordsSchemaLoading(String avroConvertorType, String schemaLoadingProperty)
|
||||
|
||||
@@ -57,7 +57,7 @@ public class SubjectNamingStrategyTest {
|
||||
"--spring.jmx.enabled=false",
|
||||
"--spring.cloud.stream.bindings.myBinding-out-0.contentType=application/*+avro",
|
||||
"--spring.cloud.stream.schema.avro.subjectNamingStrategy="
|
||||
+ "org.springframework.cloud.schema.registry.avro.QualifiedSubjectNamingStrategy",
|
||||
+ "org.springframework.cloud.stream.schema.registry.avro.QualifiedSubjectNamingStrategy",
|
||||
"--spring.cloud.stream.schema.avro.dynamicSchemaGenerationEnabled=true")) {
|
||||
StreamBridge streamBridge = context.getBean(StreamBridge.class);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user