update 优化 翻译模块 实现类使用spi文件注入
| | |
| | | import com.ruoyi.common.translation.constant.TransConstant; |
| | | import com.ruoyi.common.translation.core.TranslationInterface; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 部门翻译实现 |
| | | * |
| | | * @author Lion Li |
| | | */ |
| | | @Component |
| | | @AllArgsConstructor |
| | | @TranslationType(type = TransConstant.DEPT_ID_TO_NAME) |
| | | public class DeptNameTranslationImpl implements TranslationInterface<String> { |
| | |
| | | * |
| | | * @author Lion Li |
| | | */ |
| | | @Component |
| | | @AllArgsConstructor |
| | | @TranslationType(type = TransConstant.DICT_TYPE_TO_LABEL) |
| | | public class DictTypeTranslationImpl implements TranslationInterface<String> { |
| | |
| | | * |
| | | * @author Lion Li |
| | | */ |
| | | @Component |
| | | @AllArgsConstructor |
| | | @TranslationType(type = TransConstant.OSS_ID_TO_URL) |
| | | public class OssUrlTranslationImpl implements TranslationInterface<String> { |
| | |
| | | import com.ruoyi.common.translation.constant.TransConstant; |
| | | import com.ruoyi.common.translation.core.TranslationInterface; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 用户名翻译实现 |
| | | * |
| | | * @author Lion Li |
| | | */ |
| | | @Component |
| | | @AllArgsConstructor |
| | | @TranslationType(type = TransConstant.USER_ID_TO_NAME) |
| | | public class UserNameTranslationImpl implements TranslationInterface<String> { |
| | |
| | | com.ruoyi.common.translation.config.TranslationConfig |
| | | com.ruoyi.common.translation.core.impl.DeptNameTranslationImpl |
| | | com.ruoyi.common.translation.core.impl.DictTypeTranslationImpl |
| | | com.ruoyi.common.translation.core.impl.OssUrlTranslationImpl |
| | | com.ruoyi.common.translation.core.impl.UserNameTranslationImpl |