
package org.lym.pom.config;

import org.shoulder.autoconfigure.web.DictionaryEnumRepositoryCustomizer;
import org.shoulder.autoconfigure.web.PackageScanDictionaryEnumRepositoryRegister;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Collections;

/**
 * 自动扫描；用户手动注册；用户配置
 *
 * @author lym
 */
@Configuration
public class EnumDictionaryRegisterConfig {

    @Bean
    public DictionaryEnumRepositoryCustomizer DictionaryItemEnumRepositoryCustomizer() {
        return new PackageScanDictionaryEnumRepositoryRegister(
                Collections.singletonList("org.lym.pom.repository.mongo.enums")
        );
    }

}