lodsve.redis.core.annotations.EnableRedis Maven / Gradle / Ivy
/*
* Copyright (C) 2018 Sun.Hao
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
package lodsve.redis.core.annotations;
import lodsve.core.configuration.EnableLodsve;
import lodsve.redis.core.config.RedisConfiguration;
import org.springframework.context.annotation.Import;
import java.lang.annotation.*;
/**
* 启用redis.
*
* @author sunhao(sunhao.java @ gmail.com)
* @version V1.0, 16/1/23 下午11:19
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@EnableLodsve
@Import({RedisConfiguration.class, RedisImportSelector.class})
public @interface EnableRedis {
/**
* 数据源名称,required
*
* @return 数据源名称
*/
String[] name();
/**
* 定时器使用的数据源,如果为空,则表示不用定时器
*
* @return 定时器使用的数据源
*/
String timer() default "";
}