1

当我运行项目打包为 jar 文件时,出现以下错误。

     [localhost].[/].[dispatcherServlet] -> Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception
    java.lang.NullPointerException: null
            at java.io.Reader.<init>(Unknown Source) ~[?:1.8.0_101]
            at java.io.InputStreamReader.<init>(Unknown Source) ~[?:1.8.0_101]
            at com.github.dandelion.core.util.ResourceUtils.getContentFromInputStream(ResourceUtils.java:76) ~[dandelion-core-1.1.1.jar!/:?]
            at com.github.dandelion.core.util.ResourceUtils.getFileContentFromClasspath(ResourceUtils.java:64) ~[dandelion-core-1.1.1.jar!/:?]
            at com.github.dandelion.core.asset.locator.impl.ClasspathLocator.doGetContent(ClasspathLocator.java:79) ~[dandelion-core-1.1.1.jar!/:?]
            at com.github.dandelion.core.asset.locator.AbstractAssetLocator.getContent(AbstractAssetLocator.java:120) ~[dandelion-core-1.1.1.jar!/:?]
            at com.github.dandelion.core.asset.AssetMapper.mapToAsset(AssetMapper.java:143) ~[dandelion-core-1.1.1.jar!/:?]
            at com.github.dandelion.core.asset.AssetMapper.mapToAssets(AssetMapper.java:93) ~[dandelion-core-1.1.1.jar!/:?]
            at com.github.dandelion.core.asset.AssetQuery.perform(AssetQuery.java:137) ~[dandelion-core-1.1.1.jar!/:?]
            at com.github.dandelion.core.web.handler.impl.AssetInjectionPostHandler.handle(AssetInjectionPostHandler.java:143) ~[dandelion-core-1.1.1.jar!/:?]
            at com.github.dandelion.core.web.handler.AbstractHandlerChain.doHandle(AbstractHandlerChain.java:68) ~[dandelion-core-1.1.1.jar!/:?]
            at com.github.dandelion.core.web.handler.AbstractHandlerChain.doHandle(AbstractHandlerChain.java:73) ~[dandelion-core-1.1.1.jar!/:?]
            at 
...
4

0 回答 0