spring-projects-experimental / spring-grpc

90 stars 19 forks source link

Add autoconfig processor to improve startup time #58

Closed onobc closed 1 week ago

onobc commented 1 week ago

This commit adds the Spring Boot autoconfiguration processor to generate the META-INF/spring-autoconfigure-metadata.properties, which will improve startup time (details).

This results in the build generating a file spring-grpc/spring-grpc-spring-boot-autoconfigure/target/classes/META-INF/spring-autoconfigure-metadata.properties w/ content:

org.springframework.grpc.autoconfigure.common.codec.GrpcCodecConfiguration=
org.springframework.grpc.autoconfigure.common.codec.GrpcCodecConfiguration.ConditionalOnClass=io.grpc.Codec
org.springframework.grpc.autoconfigure.server.GrpcServerAutoConfiguration=
org.springframework.grpc.autoconfigure.server.GrpcServerAutoConfiguration.AutoConfigureAfter=org.springframework.grpc.autoconfigure.server.GrpcServerFactoryAutoConfiguration
org.springframework.grpc.autoconfigure.server.GrpcServerAutoConfiguration.ConditionalOnBean=io.grpc.BindableService
org.springframework.grpc.autoconfigure.server.GrpcServerAutoConfiguration.ConditionalOnClass=io.grpc.BindableService
org.springframework.grpc.autoconfigure.server.GrpcServerFactoryAutoConfiguration=
org.springframework.grpc.autoconfigure.server.GrpcServerFactoryAutoConfiguration$GrpcServletConfiguration=
org.springframework.grpc.autoconfigure.server.GrpcServerFactoryAutoConfiguration$GrpcServletConfiguration.ConditionalOnWebApplication=
org.springframework.grpc.autoconfigure.server.GrpcServerFactoryAutoConfiguration.AutoConfigureOrder=-2147483648
org.springframework.grpc.autoconfigure.server.GrpcServerFactoryAutoConfiguration.ConditionalOnBean=io.grpc.BindableService
org.springframework.grpc.autoconfigure.server.GrpcServerFactoryAutoConfiguration.ConditionalOnClass=io.grpc.BindableService
org.springframework.grpc.autoconfigure.server.GrpcServerFactoryConfigurations$NettyServerFactoryConfiguration=
org.springframework.grpc.autoconfigure.server.GrpcServerFactoryConfigurations$NettyServerFactoryConfiguration.ConditionalOnClass=io.grpc.netty.NettyServerBuilder
org.springframework.grpc.autoconfigure.server.GrpcServerFactoryConfigurations$ShadedNettyServerFactoryConfiguration=
org.springframework.grpc.autoconfigure.server.GrpcServerFactoryConfigurations$ShadedNettyServerFactoryConfiguration.ConditionalOnClass=io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder
org.springframework.grpc.autoconfigure.server.GrpcServerObservationAutoConfiguration=
org.springframework.grpc.autoconfigure.server.GrpcServerObservationAutoConfiguration.AutoConfigureAfter=org.springframework.boot.actuate.autoconfigure.observation.ObservationAutoConfiguration
org.springframework.grpc.autoconfigure.server.GrpcServerObservationAutoConfiguration.ConditionalOnBean=io.micrometer.observation.ObservationRegistry
org.springframework.grpc.autoconfigure.server.GrpcServerObservationAutoConfiguration.ConditionalOnClass=io.micrometer.core.instrument.binder.grpc.ObservationGrpcServerInterceptor,io.micrometer.observation.ObservationRegistry
org.springframework.grpc.autoconfigure.server.GrpcServerReflectionAutoConfiguration=
org.springframework.grpc.autoconfigure.server.GrpcServerReflectionAutoConfiguration.AutoConfigureBefore=org.springframework.grpc.autoconfigure.server.GrpcServerFactoryAutoConfiguration
org.springframework.grpc.autoconfigure.server.GrpcServerReflectionAutoConfiguration.ConditionalOnClass=io.grpc.protobuf.services.ProtoReflectionService