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 Serrvlet is not loaded when I upload the application, returning me Error 404. Do you 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 with annotations.
I am using Tomcat7.
where is the note ?
– Cristian Urbainski
@Cristianurbainski what note? I am following examples from a book and the annotated classes are Webappconifguration and Jpaconfiguration. In the Servlet class there is no annotation. As soon as possible I edit the question added the Webappconfiguration and Jpaconfiguration code
– user8078