网上查到添加配置类的解决方案,但因为本人用的spring-boot版本是2.0以上,有些类的名字有所改变,所以配置类书写如下
@Configuration
public class TomcatConfig {
@Bean
public TomcatServletWebServerFactory embeddedServletContainerFactory() {
ConfigurableServletWebServerFactory factory = new TomcatServletWebServerFactory();
// 请自行优化目录,可写配置参数
factory.setDocumentRoot(new File(“C:\Users\Administrator\IdeaProjects\jt_project\springboot_jsp\src\main\webapp\”));
return (TomcatServletWebServerFactory) factory;
}
}
idea spring-boot jsp whitelabel error page问题解决
最新推荐文章于 2024-05-22 10:34:39 发布