2016-08-22 279 views
0

我在Tomcat 8中部署Spring啓動應用程序時遇到問題。在啓動應用程序時出現以下錯誤。春季啓動Tomcat部署

java.lang.IllegalStateException: Cannot initialize context because there is already a root application context present - check whether you have multiple ContextLoader* definitions in your web.xml! 

我們webinitializer

public class SpringWebMvcInitializer extends AbstractAnnotationConfigDispatcherServletInitializer { 

@Override 
protected Class<?>[] getRootConfigClasses() { 

    return new Class[]{SecurityConfiguration.class}; 
} 

@Override 
protected Class<?>[] getServletConfigClasses() { 

    return new Class[] {WebMvcConfiguration.class}; 
} 

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

真的無法理解與問題帖子。在投票時留言。 –

回答