@ConditionalOnBean(GrpcCodecDiscoverer.class)
    @ConditionalOnMissingBean
    @Bean
    public DecompressorRegistry defaultDecompressorRegistry(final GrpcCodecDiscoverer codecDiscoverer) {
        log.debug("Found GrpcCodecDiscoverer -> Creating custom DecompressorRegistry");
        DecompressorRegistry registry = DecompressorRegistry.getDefaultInstance();
        for (final GrpcCodecDefinition definition : codecDiscoverer.findGrpcCodecs()) {
            if (definition.getCodecType().isForDecompression()) {
                final Codec codec = definition.getCodec();
                final boolean isAdvertised = definition.isAdvertised();
                log.debug("Registering {} decompressor: '{}' ({})",
                        isAdvertised ? "advertised" : "", codec.getMessageEncoding(), codec.getClass().getName());
                registry = registry.with(codec, isAdvertised);
            }
        }
        return registry;
    }
The auto configuration used by Spring-Boot that contains all codec related beans for clients/servers.

@author Daniel Theuke (daniel.theuke@heuboe.de)
grpc-common-spring-boot/src/main/java/net/devh/boot/grpc/common/autoconfigure/GrpcCommonCodecAutoConfiguration.java