Fix DefaultRateLimitService init
This commit is contained in:
parent
3ee8a8c56d
commit
a729967a93
@ -20,6 +20,7 @@ import com.github.benmanes.caffeine.cache.Caffeine;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.thingsboard.server.common.data.StringUtils;
|
||||
import org.thingsboard.server.common.data.TenantProfile;
|
||||
@ -33,6 +34,7 @@ import org.thingsboard.server.common.msg.tools.TbRateLimits;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Lazy
|
||||
@Service
|
||||
@Slf4j
|
||||
public class DefaultRateLimitService implements RateLimitService {
|
||||
@ -41,7 +43,7 @@ public class DefaultRateLimitService implements RateLimitService {
|
||||
private final NotificationRuleProcessor notificationRuleProcessor;
|
||||
|
||||
public DefaultRateLimitService(TenantProfileProvider tenantProfileProvider,
|
||||
NotificationRuleProcessor notificationRuleProcessor,
|
||||
@Lazy NotificationRuleProcessor notificationRuleProcessor,
|
||||
@Value("${cache.rateLimits.timeToLiveInMinutes:120}") int rateLimitsTtl,
|
||||
@Value("${cache.rateLimits.maxSize:200000}") int rateLimitsCacheMaxSize) {
|
||||
this.tenantProfileProvider = tenantProfileProvider;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user