@Bean public EmbeddedServletContainerCustomizer documentDirectoryCustomizer () { return new EmbeddedServletContainerCustomizer() { public void customize(ConfigurableEmbeddedServletContainer container) { LOGGER.info("当前JSP加载目录为:" + jspPath); File jspDirFile = new File(jspPath); if(!jspDirFile.exists()) { LOGGER.error("JSP目录不存在:" + jspPath); System.exit(0); } container.setDocumentRoot(jspDirFile); } }; }
springboot 自定义webroot的目录
最新推荐文章于 2022-09-06 20:51:58 发布