All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gitee.rabbitnoteeth.bedrock.http.server.HttpServerProperties Maven / Gradle / Ivy

The newest version!
package com.gitee.rabbitnoteeth.bedrock.http.server;

import io.vertx.core.impl.cpu.CpuCoreSensor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConditionalOnProperty(value = "http", matchIfMissing = true)
@ConfigurationProperties(prefix = "http")
public class HttpServerProperties {

    private boolean enable = false;
    private int port = 8080;
    private int instanceNum = 2 * CpuCoreSensor.availableProcessors();
    private String staticRoot = "static";
    private boolean reactiveMode = false;

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getStaticRoot() {
        return staticRoot;
    }

    public void setStaticRoot(String staticRoot) {
        this.staticRoot = staticRoot;
    }

    public int getInstanceNum() {
        return instanceNum;
    }

    public void setInstanceNum(int instanceNum) {
        this.instanceNum = instanceNum;
    }

    public boolean isReactiveMode() {
        return reactiveMode;
    }

    public void setReactiveMode(boolean reactiveMode) {
        this.reactiveMode = reactiveMode;
    }

    public boolean isEnable() {
        return enable;
    }

    public void setEnable(boolean enable) {
        this.enable = enable;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy