use of org.springframework.boot.web.context.WebServerPortFileWriter in project spring-boot by spring-projects.
the class ResourceHandlingApplication method main.
public static void main(String[] args) {
try {
Class.forName("org.springframework.web.servlet.DispatcherServlet");
System.err.println("Spring MVC must not be present, otherwise its static resource handling " + "will be used rather than the embedded containers'");
System.exit(1);
} catch (Throwable ex) {
new SpringApplicationBuilder(ResourceHandlingApplication.class).properties("server.port:0").listeners(new WebServerPortFileWriter(args[0])).run(args);
}
}
Aggregations