Servlet configured with annotations is not loaded

1

I have the following class:

public class SpringServlet extends AbstractAnnotationConfigDispatcherServletInitializer{

    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class[]{};
    }

    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class[]{WebAppConfiguration.class,JPAConfiguration.class};
    }

    @Override
    protected String[] getServletMappings() {
        return new String[]{"/"};
    }

}

My servlet is not loaded when I upload the application, returning me Error 404. Anyone have any idea why? In my log there is no error. I used Spring with xml and I'm trying to learn how to use it with annotations.

I'm using Tomcat7.

    
asked by anonymous 22.11.2015 / 15:49

0 answers