zrlw commented on code in PR #16005:
URL: https://github.com/apache/dubbo/pull/16005#discussion_r2696781589
##########
dubbo-spring-boot-project/dubbo-spring-boot-autoconfigure/src/main/java/org/apache/dubbo/spring/boot/autoconfigure/SpringBoot3Condition.java:
##########
@@ -21,9 +21,44 @@
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;
+/**
+ * Condition that matches when running on Spring Boot 3.x or higher.
+ *
+ * <p>This condition is used to enable Spring Boot 3.x specific
auto-configuration
+ * that requires Jakarta EE APIs (jakarta.servlet.*) instead of Java EE APIs
(javax.servlet.*).
+ *
+ * <p>Compatible with Spring Boot 3.5.x and Spring Cloud 2025.0.0.
+ *
+ * @since 3.2.0
+ */
public class SpringBoot3Condition implements Condition {
- public static boolean IS_SPRING_BOOT_3 =
SpringBootVersion.getVersion().charAt(0) >= '3';
+ /**
+ * Cached result indicating if we're running on Spring Boot 3.x or higher.
+ * Uses safe version parsing to handle edge cases.
+ */
+ public static final boolean IS_SPRING_BOOT_3 = isSpringBoot3OrHigher();
+
+ private static boolean isSpringBoot3OrHigher() {
Review Comment:
see org.apache.dubbo.spring.boot.autoconfigure.SpringBoot3Condition
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]