1414 * limitations under the License.
1515 */
1616
17- package org .springframework .boot .autoconfigure . web . servlet ;
17+ package org .springframework .boot .servlet . autoconfigure ;
1818
1919import java .net .URI ;
2020import java .util .stream .Stream ;
2828
2929import org .springframework .boot .context .properties .EnableConfigurationProperties ;
3030import org .springframework .boot .jetty .servlet .JettyServletWebServerFactory ;
31- import org .springframework .boot .servlet .autoconfigure .MultipartAutoConfiguration ;
32- import org .springframework .boot .servlet .autoconfigure .MultipartProperties ;
3331import org .springframework .boot .test .util .TestPropertyValues ;
3432import org .springframework .boot .testsupport .classpath .ForkedClassPath ;
3533import org .springframework .boot .testsupport .web .servlet .DirtiesUrlFactories ;
3836import org .springframework .boot .undertow .servlet .UndertowServletWebServerFactory ;
3937import org .springframework .boot .web .server .autoconfigure .ServerProperties ;
4038import org .springframework .boot .web .server .servlet .context .AnnotationConfigServletWebServerApplicationContext ;
41- import org .springframework .boot .webmvc .autoconfigure .DispatcherServletAutoConfiguration ;
4239import org .springframework .context .annotation .Bean ;
4340import org .springframework .context .annotation .Configuration ;
4441import org .springframework .context .annotation .Import ;
@@ -267,8 +264,7 @@ WebController controller() {
267264 }
268265
269266 @ Configuration (proxyBeanMethods = false )
270- @ Import ({ TomcatServletWebServerAutoConfiguration .class , DispatcherServletAutoConfiguration .class ,
271- MultipartAutoConfiguration .class })
267+ @ Import ({ TomcatServletWebServerAutoConfiguration .class , MultipartAutoConfiguration .class })
272268 @ EnableConfigurationProperties (MultipartProperties .class )
273269 static class BaseConfiguration {
274270
@@ -279,6 +275,11 @@ ServerProperties serverProperties() {
279275 return properties ;
280276 }
281277
278+ @ Bean
279+ DispatcherServlet dispatcherServlet () {
280+ return new DispatcherServlet ();
281+ }
282+
282283 }
283284
284285 @ Configuration (proxyBeanMethods = false )
0 commit comments