diff --git a/spring-grpc-spring-boot-autoconfigure/src/main/java/org/springframework/grpc/autoconfigure/server/GrpcServerFactoryAutoConfiguration.java b/spring-grpc-spring-boot-autoconfigure/src/main/java/org/springframework/grpc/autoconfigure/server/GrpcServerFactoryAutoConfiguration.java index 4aae02a..0c5df78 100644 --- a/spring-grpc-spring-boot-autoconfigure/src/main/java/org/springframework/grpc/autoconfigure/server/GrpcServerFactoryAutoConfiguration.java +++ b/spring-grpc-spring-boot-autoconfigure/src/main/java/org/springframework/grpc/autoconfigure/server/GrpcServerFactoryAutoConfiguration.java @@ -18,6 +18,10 @@ package org.springframework.grpc.autoconfigure.server; import java.util.List; import java.util.stream.Collectors; +import io.grpc.BindableService; +import io.grpc.servlet.jakarta.GrpcServlet; +import io.grpc.servlet.jakarta.ServletServerBuilder; + import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.AutoConfigureOrder; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; @@ -33,10 +37,6 @@ import org.springframework.context.annotation.Import; import org.springframework.core.Ordered; import org.springframework.util.unit.DataSize; -import io.grpc.BindableService; -import io.grpc.servlet.jakarta.GrpcServlet; -import io.grpc.servlet.jakarta.ServletServerBuilder; - /** * {@link EnableAutoConfiguration Auto-configuration} for gRPC server-side components. *

@@ -74,7 +74,6 @@ public class GrpcServerFactoryAutoConfiguration { ServletServerBuilder servletServerBuilder = new ServletServerBuilder(); services.forEach(servletServerBuilder::addService); PropertyMapper mapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); - // Only maxInboundMessageSize is customizable mapper.from(properties.getMaxInboundMessageSize()) .asInt(DataSize::toBytes) .to(servletServerBuilder::maxInboundMessageSize);