remove 移除过期代码 多数据源切换

This commit is contained in:
疯狂的狮子li
2021-12-28 14:33:08 +08:00
parent 4e04f5e967
commit 5b257b2b57
3 changed files with 0 additions and 117 deletions

View File

@ -1,25 +0,0 @@
package com.ruoyi.common.annotation;
import com.ruoyi.common.enums.DataSourceType;
import java.lang.annotation.*;
/**
* 自定义多数据源切换注解
* <p>
* 优先级:先方法,后类,如果方法覆盖了类上的数据源类型,以方法的为准,否则以类上的为准
*
* @author ruoyi
* @deprecated 3.6.0 移除 使用原生注解处理 方法更全 {@link com.baomidou.dynamic.datasource.annotation.DS}
*/
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@Deprecated
public @interface DataSource {
/**
* 切换数据源名称
*/
DataSourceType value() default DataSourceType.MASTER;
}

View File

@ -1,27 +0,0 @@
package com.ruoyi.common.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 数据源
*
* @author Lion Li
* @deprecated 3.6.0 移除
*/
@AllArgsConstructor
@Deprecated
public enum DataSourceType {
/**
* 主库
*/
MASTER("master"),
/**
* 从库
*/
SLAVE("slave");
@Getter
private final String source;
}