RSocket integration in spring-cloud-function has no dependency on anything web, yet spring-boot-starter-rsocket
brings spring-web
into the classpath. Trying to exclude it results in variety of classpath errors which are easily fixable until the EmbeddedServerAutoConfiguration
issue (see stack trace below)
Caused by: org.springframework.boot.autoconfigure.condition.OnBeanCondition$BeanTypeDeductionException: Failed to deduce bean type for org.springframework.boot.autoconfigure.rsocket.RSocketServerAutoConfiguration$EmbeddedServerAutoConfiguration.reactorResourceFactory
at org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.deducedBeanTypeForBeanMethod(OnBeanCondition.java:517) ~[spring-boot-autoconfigure-2.4.3.jar:2.4.3]
at org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.deducedBeanType(OnBeanCondition.java:506) ~[spring-boot-autoconfigure-2.4.3.jar:2.4.3]
at org.springframework.boot.autoconfigure.condition.OnBeanCondition$Spec.<init>(OnBeanCondition.java:429) ~[spring-boot-autoconfigure-2.4.3.jar:2.4.3]
... 85 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.http.client.reactive.ReactorResourceFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[na:1.8.0_252]
After briefly discussing it with @wilkinsona there seems to be a missing condition for backing-off EmbeddedServerAutoConfiguration
if certain dependencies are not present.
Comment From: snicoll
Thanks for the report.
Unrelated but the inner classes are named AutoConfiguration
and shouldn't really.