Skip to content

Instantly share code, notes, and snippets.

@flnj
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flnj/76fae9d248a8ee7b69a9 to your computer and use it in GitHub Desktop.
Save flnj/76fae9d248a8ee7b69a9 to your computer and use it in GitHub Desktop.
@Bean
public DispatcherServlet dispatcherServlet() {
return new DispatcherServlet();
}
@Bean
public ServletRegistrationBean dispatchcherServletRegistration(){
ServletRegistrationBean registrationBean =new ServletRegistrationBean(dispatcherServlet(), "/rest/v1/*");
registrationBean
.setName(DispatcherServletAutoConfiguration.DEFAULT_DISPATCHER_SERVLET_REGISTRATION_BEAN_NAME );
return registrationBean;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment