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:
Soby Chacko
2023-09-08 15:14:19 -04:00
parent 26597db5b0
commit a1424fc4bf
3 changed files with 5 additions and 5 deletions

View File

@@ -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;

View File

@@ -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)

View File

@@ -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);