在spring项目使用Jfinal-undertow后启动报错,异常堆栈如下,有没有人遇到过?
报错代码在spring里:
public static void setWebAppRootSystemProperty(ServletContext servletContext) throws IllegalStateException { Assert.notNull(servletContext, "ServletContext must not be null"); String root = servletContext.getRealPath("/"); if (root == null) { throw new IllegalStateException( "Cannot set web app root system property when WAR file is not expanded"); }
java.lang.RuntimeException: java.lang.IllegalStateException: Cannot set web app root system property when WAR file is not expanded at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:252) at com.jfinal.server.undertow.UndertowServer.doStart(UndertowServer.java:253) at com.jfinal.server.undertow.UndertowServer.start(UndertowServer.java:152) at com.platform.PlatformApplication.main(PlatformApplication.java:24) Caused by: java.lang.IllegalStateException: Cannot set web app root system property when WAR file is not expanded at org.springframework.web.util.WebUtils.setWebAppRootSystemProperty(WebUtils.java:155) at org.springframework.web.util.WebAppRootListener.contextInitialized(WebAppRootListener.java:57) at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187) at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:216) at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:185) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:250) ... 3 more