类 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的实现类
  • 字段详细资料

    • LOGGER

      public static final org.slf4j.Logger LOGGER
  • 构造器详细资料

    • AutoTransService

      public AutoTransService()
  • 方法详细资料

    • transOne

      public void transOne(org.dromara.core.trans.vo.VO obj, List<Field> toTransList)
      从接口复制的说明: 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

      public void afterPropertiesSet() throws Exception
      指定者:
      afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBean
      抛出:
      Exception
    • init

      public void init(org.springframework.boot.context.event.ApplicationReadyEvent event)
    • refreshCache

      public void refreshCache(Map<String,Object> messageMap)
      刷新缓存
      参数:
      messageMap - 消息
    • refreshOneNamespace

      public void refreshOneNamespace(String namespace)
      刷新一个namespace下的所有的缓存
      参数:
      namespace - namespace
    • getRedisTransCache

      public RedisCacheService<Map<String,Object>> getRedisTransCache()
    • transKey

      public String transKey(String namespace, String pkeyVal)
      翻译单个的key
      参数:
      namespace - namespace
      pkeyVal - 主键
      返回:
    • 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

      public void setRedisTransCache(RedisCacheService<Map<String,Object>> redisTransCache)
    • regTransable

      public void regTransable(AutoTransable transAble, org.dromara.core.trans.anno.AutoTrans autoTransSett)
    • reset

      public void reset()
      指定者:
      reset 在接口中 ITransTypeService