Skip to content

Commit 1e1a8e4

Browse files
committed
Use name not type in meta annotation
1 parent 6fc10ed commit 1e1a8e4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
2727
import org.springframework.context.annotation.Conditional;
2828

29-
import io.grpc.servlet.jakarta.GrpcServlet;
30-
3129
/**
3230
* {@link Conditional @Conditional} that determines if the Servlet container should be
3331
* used to run the gRPC server. The condition matches only when the app is a servlet web
@@ -42,7 +40,8 @@
4240
@Retention(RetentionPolicy.RUNTIME)
4341
@Target({ ElementType.TYPE, ElementType.METHOD })
4442
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
45-
@ConditionalOnClass(GrpcServlet.class)
43+
// https://github.com/spring-projects/spring-framework/issues/35927
44+
@ConditionalOnClass(name = "io.grpc.servlet.jakarta.GrpcServlet")
4645
@ConditionalOnProperty(prefix = "spring.grpc.server", name = "servlet.enabled", havingValue = "true",
4746
matchIfMissing = true)
4847
public @interface ConditionalOnGrpcServletServer {

0 commit comments

Comments
 (0)