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

com.github.antelopeframework.mybatis.shard.ShardTable Maven / Gradle / Ivy

There is a newer version: 1.1.5
Show newest version
package com.github.antelopeframework.mybatis.shard;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.util.Assert;

import com.github.antelopeframework.mybatis.shard.strategy.ShardStrategy;

import lombok.Getter;
import lombok.Setter;

/**
 * 如何分表配置项. 包括:
 * 
    *
  • {@link #originalTableName}: 原始表名
  • *
  • {@link #separator}: 分隔符
  • *
  • {@link #strategy}: 分表策略
  • *
* * @author yangzhi.yzh * */ @Getter @Setter public class ShardTable implements InitializingBean { /** 原始表名 */ private String originalTableName; /** 表名分隔符 */ private String separator = "_"; /** 分表命名策略 */ private ShardStrategy strategy; @Override public void afterPropertiesSet() throws Exception { Assert.hasText(originalTableName, "Property 'originalTableName' of ShardTable must have text."); Assert.hasText(separator, "Property 'separator' of ShardTable must have text."); Assert.notNull(strategy, "Property 'strategy' of ShardTable must not be null."); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy