java - Switch off DispatcherServlet on Spring Boot -


how can disable dispatcherservlet on springboot, trying disable via servlet registration uri mapping appears on log:

@bean public servletregistrationbean servletregistrationbean(final dispatcherservlet dispatcherservlet) {     final servletregistrationbean servletregistrationbean = new servletregistrationbean(dispatcherservlet);     servletregistrationbean.setenabled(false);      return servletregistrationbean; } 

log

2015-06-10 10:39:57.552  info 7032 --- [           main] o.s.b.c.e.servletregistrationbean        : servlet dispatcherservlet not registered (disabled) 2015-06-10 10:39:57.553  info 7032 --- [           main] o.s.b.c.e.servletregistrationbean        : mapping servlet: 'dispatcherservlet' [/] 

thanks help!

i added below code main class, , servlet removed log.

@springbootapplication(exclude = { dispatcherservletautoconfiguration.class }) 

Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -