springBoot jsp

@Configuration 
public class SpringBootJSPConfiguration {

@Bean
public WebServerFactoryCustomizer <TomcatServletWebServerFactory> Customizer () {
return (Factory's) -> {
factory.addContextCustomizers ((context) -> {
// Of course, here to write your own
String relativePath = "erp / src / main / the webapp ";
File = docBaseFile new new File (relativePath The);
// path exists
iF (docBaseFile.exists ()) {
context.setDocBase (docBaseFile.getAbsolutePath ());
}
}
);
};
}

}

Guess you like

Origin www.cnblogs.com/-mzh/p/11583619.html