Created
June 23, 2018 05:25
-
-
Save nareshnaredla2424/b64a424ee0f98050e3d5c6c58fa53e27 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javabycode.config; | |
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; | |
import com.javabycode.filter.CORSFilter; | |
import javax.servlet.Filter; | |
public class ServletInitializer extends AbstractAnnotationConfigDispatcherServletInitializer { | |
@Override | |
protected Class<?>[] getServletConfigClasses() { | |
return new Class[] { MyWebConfig.class }; | |
} | |
@Override | |
protected String[] getServletMappings() { | |
return new String[] { "/" }; | |
} | |
@Override | |
protected Class<?>[] getRootConfigClasses() { | |
return null; | |
} | |
@Override | |
protected Filter[] getServletFilters() { | |
return new Filter[]{ new CORSFilter()}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment