@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的目录
最新推荐文章于 2024-08-13 10:48:29 发布