类 AutoTransService
java.lang.Object
org.dromara.trans.service.impl.AutoTransService
- 所有已实现的接口:
EventListener,ITransTypeService,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationReadyEvent>
public class AutoTransService
extends Object
implements ITransTypeService, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationReadyEvent>
本接类使用需要配合Autotrans 注解和autoTransAble的实现类
-
字段概要
字段从接口继承的字段 org.dromara.trans.service.impl.ITransTypeService
GLOBAL_TRANS_CACHE, Logger, namespaceUniqueFieldMap -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidvoidinit(org.springframework.boot.context.event.ApplicationReadyEvent event) voidonApplicationEvent(org.springframework.boot.context.event.ApplicationReadyEvent event) voidrefreshCache(Map<String, Object> messageMap) 刷新缓存voidrefreshOneNamespace(String namespace) 刷新一个namespace下的所有的缓存voidregTransable(AutoTransable transAble, org.dromara.core.trans.anno.AutoTrans autoTransSett) voidreset()scan(Class<? extends Annotation> annotationClass, String[] packageNames) 类扫描器voidsetRedisTransCache(RedisCacheService<Map<String, Object>> redisTransCache) 翻译单个的keyvoid翻译多个 字段void翻译一个字段从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.dromara.trans.service.impl.ITransTypeService
clearGlobalCache, findById, findByIds, getFromGlobalCache, initLocalFromGlobalCache, put2GlobalCache, setRef, setRef, setRef, setRef, setRef, setRefs, setUniqueFieldCache, setValue, unTransMore, unTransOne
-
字段详细资料
-
LOGGER
public static final org.slf4j.Logger LOGGER
-
-
构造器详细资料
-
AutoTransService
public AutoTransService()
-
-
方法详细资料
-
transOne
从接口复制的说明:ITransTypeService翻译一个字段- 指定者:
transOne在接口中ITransTypeService- 参数:
obj- 需要翻译的对象toTransList- 需要翻译的字段
-
transMore
public void transMore(List<? extends org.dromara.core.trans.vo.VO> objList, List<Field> toTransList) 从接口复制的说明:ITransTypeService翻译多个 字段- 指定者:
transMore在接口中ITransTypeService- 参数:
objList- 需要翻译的对象集合toTransList- 需要翻译的字段集合
-
afterPropertiesSet
- 指定者:
afterPropertiesSet在接口中org.springframework.beans.factory.InitializingBean- 抛出:
Exception
-
init
public void init(org.springframework.boot.context.event.ApplicationReadyEvent event) -
refreshCache
刷新缓存- 参数:
messageMap- 消息
-
refreshOneNamespace
刷新一个namespace下的所有的缓存- 参数:
namespace- namespace
-
getRedisTransCache
-
transKey
翻译单个的key- 参数:
namespace- namespacepkeyVal- 主键- 返回:
-
scan
public static Set<Class<?>> scan(Class<? extends Annotation> annotationClass, String[] packageNames) 类扫描器- 参数:
annotationClass- 注解packageNames- 包- 返回:
- 符合条件的类
-
onApplicationEvent
public void onApplicationEvent(org.springframework.boot.context.event.ApplicationReadyEvent event) - 指定者:
onApplicationEvent在接口中org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationReadyEvent>
-
setRedisTransCache
-
regTransable
public void regTransable(AutoTransable transAble, org.dromara.core.trans.anno.AutoTrans autoTransSett) -
reset
public void reset()- 指定者:
reset在接口中ITransTypeService
-