Search in sources :

Example 1 with ServerConfigInfo

use of org.pdown.rest.entity.ServerConfigInfo in project proxyee-down by monkeyWie.

the class DownApplication method initRest.

private void initRest() {
    // init rest server config
    HttpDownRestCallback.setCallback(new HttpDownAppCallback());
    RestWebServerFactoryCustomizer.init(null);
    ServerConfigInfo serverConfigInfo = ConfigContent.getInstance().get();
    serverConfigInfo.setPort(REST_PORT);
    if (StringUtils.isEmpty(serverConfigInfo.getFilePath())) {
        serverConfigInfo.setFilePath(System.getProperty("user.home") + File.separator + "Downloads");
    }
    new SpringApplicationBuilder(DownRestServer.class).headless(false).build().run();
}
Also used : DownRestServer(org.pdown.rest.DownRestServer) HttpDownAppCallback(org.pdown.gui.rest.HttpDownAppCallback) SpringApplicationBuilder(org.springframework.boot.builder.SpringApplicationBuilder) ServerConfigInfo(org.pdown.rest.entity.ServerConfigInfo)

Aggregations

HttpDownAppCallback (org.pdown.gui.rest.HttpDownAppCallback)1 DownRestServer (org.pdown.rest.DownRestServer)1 ServerConfigInfo (org.pdown.rest.entity.ServerConfigInfo)1 SpringApplicationBuilder (org.springframework.boot.builder.SpringApplicationBuilder)1