init
This commit is contained in:
@@ -7,7 +7,7 @@ import com.ruoyi.component.translation.core.handler.TranslationBeanSerializerMod
|
||||
import com.ruoyi.component.translation.core.handler.TranslationHandler;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.util.HashMap;
|
||||
@@ -20,7 +20,7 @@ import java.util.Map;
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Slf4j
|
||||
@Configuration
|
||||
@AutoConfiguration
|
||||
public class TranslationConfig {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.ruoyi.component.translation.constant.TransConstant;
|
||||
import com.ruoyi.component.translation.core.TranslationInterface;
|
||||
import com.ruoyi.component.core.util.StringUtils;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
@@ -13,7 +14,7 @@ import org.springframework.stereotype.Component;
|
||||
*
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Component
|
||||
@AutoConfiguration
|
||||
@AllArgsConstructor
|
||||
@TranslationType(type = TransConstant.DICT_TYPE_TO_LABEL)
|
||||
public class DictTypeTranslationImpl implements TranslationInterface<String> {
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.ruoyi.component.translation.annotation.TranslationType;
|
||||
import com.ruoyi.component.translation.constant.TransConstant;
|
||||
import com.ruoyi.component.translation.core.TranslationInterface;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
@@ -12,7 +13,7 @@ import org.springframework.stereotype.Component;
|
||||
*
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Component
|
||||
@AutoConfiguration
|
||||
@AllArgsConstructor
|
||||
@TranslationType(type = TransConstant.OSS_ID_TO_URL)
|
||||
public class OssUrlTranslationImpl implements TranslationInterface<String> {
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.ruoyi.component.translation.annotation.TranslationType;
|
||||
import com.ruoyi.component.translation.constant.TransConstant;
|
||||
import com.ruoyi.component.translation.core.TranslationInterface;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
@@ -12,7 +13,7 @@ import org.springframework.stereotype.Component;
|
||||
*
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Component
|
||||
@AutoConfiguration
|
||||
@AllArgsConstructor
|
||||
@TranslationType(type = TransConstant.USER_ID_TO_NAME)
|
||||
public class UserNameTranslationImpl implements TranslationInterface<String> {
|
||||
|
||||
Reference in New Issue
Block a user