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

com.founder.core.starter.properties.RateLimiterProperties Maven / Gradle / Ivy

package com.founder.core.starter.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = RateLimiterProperties.PREFIX)
public class RateLimiterProperties {

    public static final String PREFIX = "spring.ratelimiter";

    private ClusterServer redisClusterServer;

    private int statusCode = 429;
    private String responseBody = "{\"code\":429,\"msg\":\"Too Many Requests\"}";

    public int getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(int statusCode) {
        this.statusCode = statusCode;
    }

    public String getResponseBody() {
        return responseBody;
    }

    public void setResponseBody(String responseBody) {
        this.responseBody = responseBody;
    }

    public ClusterServer getRedisClusterServer() {
        return redisClusterServer;
    }

    public void setRedisClusterServer(ClusterServer redisClusterServer) {
        this.redisClusterServer = redisClusterServer;
    }

    public static class ClusterServer {
        private String[] nodeAddresses;

        public String[] getNodeAddresses() {
            return nodeAddresses;
        }

        public void setNodeAddresses(String[] nodeAddresses) {
            this.nodeAddresses = nodeAddresses;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy