Skip to content

Commit 1397632

Browse files
committed
Polish "Allow GrpcServlet to be configured"
* Re-order imports (we need to add the checkstyle rules to keep these consistent) * Remove implied comment in auto-configuration
1 parent 7da1e80 commit 1397632

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

spring-grpc-spring-boot-autoconfigure/src/main/java/org/springframework/grpc/autoconfigure/server/GrpcServerFactoryAutoConfiguration.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
import java.util.List;
1919
import java.util.stream.Collectors;
2020

21+
import io.grpc.BindableService;
22+
import io.grpc.servlet.jakarta.GrpcServlet;
23+
import io.grpc.servlet.jakarta.ServletServerBuilder;
24+
2125
import org.springframework.boot.autoconfigure.AutoConfiguration;
2226
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
2327
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
@@ -33,10 +37,6 @@
3337
import org.springframework.core.Ordered;
3438
import org.springframework.util.unit.DataSize;
3539

36-
import io.grpc.BindableService;
37-
import io.grpc.servlet.jakarta.GrpcServlet;
38-
import io.grpc.servlet.jakarta.ServletServerBuilder;
39-
4040
/**
4141
* {@link EnableAutoConfiguration Auto-configuration} for gRPC server-side components.
4242
* <p>
@@ -74,7 +74,6 @@ public ServletRegistrationBean<GrpcServlet> grpcServlet(GrpcServerProperties pro
7474
ServletServerBuilder servletServerBuilder = new ServletServerBuilder();
7575
services.forEach(servletServerBuilder::addService);
7676
PropertyMapper mapper = PropertyMapper.get().alwaysApplyingWhenNonNull();
77-
// Only maxInboundMessageSize is customizable
7877
mapper.from(properties.getMaxInboundMessageSize())
7978
.asInt(DataSize::toBytes)
8079
.to(servletServerBuilder::maxInboundMessageSize);

0 commit comments

Comments
 (0)