Is it possible to have the equivalent of
defined in an AnnotationConfig(Web)ApplicationContext
? Right now I have:<
After digging a bit deeper, I found out that this is a known problem and is addressed by annotation features in the upcoming Spring 3.1.
I solved my problem with the following code:
@Configuration
@Import(FeatureConfig.class)
class AppConfig {
...
}
@FeatureConfiguration
class FeatureConfig {
@Feature
public MvcDefaultServletHandler defaultHandler() {
return new MvcDefaultServletHandler();
}
}
This does require using the milestone version of spring, though, but it seems to be the cleanest and preferred way of handling this.