首页 > 编程语言 > 详细

springBoot jsp

时间:2019-09-25 13:52:49      阅读:104      评论:0      收藏:0      [点我收藏+]
@Configuration
public class SpringBootJSPConfiguration {

@Bean
public WebServerFactoryCustomizer<TomcatServletWebServerFactory> customizer() {
return (factory) -> {
factory.addContextCustomizers((context) -> {
//当然这里要写你自己的
String relativePath = "erp/src/main/webapp";
File docBaseFile = new File(relativePath);
// 路径是否存在
if (docBaseFile.exists()) {
context.setDocBase(docBaseFile.getAbsolutePath());
}
}
);
};
}

}

springBoot jsp

原文:https://www.cnblogs.com/-mzh/p/11583619.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!