//package com.fs.core.config;
//
//import org.springframework.boot.context.config.ConfigDataLocation;
//import org.springframework.boot.context.config.ConfigDataLocationResolver;
//import org.springframework.boot.context.config.ConfigDataLocationResolverContext;
//import org.springframework.boot.context.config.ConfigDataResource;
//import org.springframework.boot.context.config.Profiles;
//import org.springframework.util.StringUtils;
//
//import java.util.Collections;
//import java.util.List;
//
//public class WildcardClasspathConfigDataLocationResolver implements ConfigDataLocationResolver<WildcardClasspathConfigDataLoader.WildcardResource> {
//
//    private static final String PREFIX = "classpath*:";
//
//    @Override
//    public boolean isResolvable(ConfigDataLocationResolverContext context, ConfigDataLocation location) {
//        return location.getValue().startsWith(PREFIX);
//    }
//
//    @Override
//    public List<WildcardClasspathConfigDataLoader.WildcardResource> resolve(
//            ConfigDataLocationResolverContext context, ConfigDataLocation location, Profiles profiles) {
//
//        String pattern = location.getValue().substring(PREFIX.length());
//        if (!StringUtils.hasText(pattern)) {
//            return Collections.emptyList();
//        }
//
//        return Collections.singletonList(
//                new WildcardClasspathConfigDataLoader.WildcardResource(pattern)
//        );
//    }
//}