Building a RESTful Web Service :: Learn how to create a RESTful web service with Spring. :: spring-boot http://spring.io/guides/gs/rest-service/

HelloWorldWebAppInitializer.java 512B

1234567891011121314151617181920212223
  1. package hello;
  2. import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
  3. public class HelloWorldWebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
  4. @Override
  5. protected Class<?>[] getRootConfigClasses() {
  6. return null;
  7. }
  8. @Override
  9. protected Class<?>[] getServletConfigClasses() {
  10. return new Class[] { HelloWorldConfiguration.class };
  11. }
  12. @Override
  13. protected String[] getServletMappings() {
  14. return new String[] { "/" };
  15. }
  16. }