public static void main()

in example/src/main/java/org/apache/rocketmq/schema/registry/example/GetSchemaDemo.java [31:56]


    public static void main(String[] args) {

        String baseUrl = "http://localhost:8080";
        SchemaRegistryClient schemaRegistryClient = SchemaRegistryClientFactory.newClient(baseUrl, null);

        String topic = "TopicTest";
        try {
            GetSchemaResponse response
                = schemaRegistryClient.getSchemaBySubject(topic);
            System.out.println("get schema by subject success, response: " + response);

            response = schemaRegistryClient.getSchemaBySubjectAndVersion("default", "default", topic, 1);
            System.out.println("get schema by subject and version success, response: " + response);

            List<SchemaRecordDto> schemaList = schemaRegistryClient.getSchemaListBySubject("default", "default", topic);
            System.out.println("get all schema records success, response: " + schemaList);
        } catch (RestClientException | IOException e) {
            e.printStackTrace();
        }
        try {
            List<SchemaRecordDto> schemas = schemaRegistryClient.getSchemaListBySubject("default", "default", topic);
            System.out.println(schemas);
        } catch (RestClientException | IOException e) {
            e.printStackTrace();
        }
    }