mirror of
https://github.com/spring-cloud/spring-cloud-netflix.git
synced 2026-09-17 15:49:00 +00:00
Fix NoClassDefFoundError loading RxJavaAutoConfiguration without spring-webmvc (#1442)
RxJavaReturnValueHandlerConfig can only be loaded when both spring-web and spring-webmvc are on the classpath, because it contains a reference to the WebMvcConfigurerAdapter class. But the ConditionalOnClass annotation only included the class from spring-web. In our situation, only spring-web was on the classpath, resulting in a NoClassDefFoundError for WebMvcConfigurerAdapter. Fix it by adding that class to the condition as well.
This commit is contained in:
committed by
Spencer Gibb
parent
704a874e84
commit
e6298f8107
+1
-1
@@ -39,7 +39,7 @@ import rx.Single;
|
||||
public class RxJavaAutoConfiguration {
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnClass(AsyncHandlerMethodReturnValueHandler.class)
|
||||
@ConditionalOnClass({ AsyncHandlerMethodReturnValueHandler.class, WebMvcConfigurerAdapter.class })
|
||||
protected static class RxJavaReturnValueHandlerConfig {
|
||||
@Bean
|
||||
public SingleReturnValueHandler singleReturnValueHandler() {
|
||||
|
||||
Reference in New Issue
Block a user