"After debugging, the problem is that mvc configuration class EnableWebMvcConfiguration load too early, servlet not loaded yet."
I spent a few hours on this.
I managed to find a reason why this was happening.
My config was split into several files and I was creating a MVC related bean in the Security Config (which was created earlier) forcing to use the MVC config before its time.
The solution was to move the @Bean instance from the security config to the MVC config.
I hope it helps other people!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…