package com.yanzuoguang.redis.level; import com.yanzuoguang.redis.PlanLevelNamespaceDefault; import com.yanzuoguang.redis.vo.PlanLevelType; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; /** * 应用程序级别 * * @author 颜佐光 */ @Component public class PlanLevelNamespaceApplication implements PlanLevelNamespaceDefault { @Value("${spring.application.name:}") private String applicationName; @Override public String getLevelNamespace() { return applicationName; } @Override public PlanLevelType getLevel() { return PlanLevelType.Application; } }