liusheng
8 天以前 9104573730e4d34625cd4a671cc42ded9ebb37af
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/config/WebConfig.java
@@ -3,7 +3,6 @@
import cn.lihu.jh.module.infra.dal.dataobject.config.ConfigDO;
import cn.lihu.jh.module.infra.service.config.ConfigService;
import org.springframework.context.annotation.Configuration;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@@ -20,7 +19,8 @@
        ConfigDO configByKey = configService.getConfigByKey("file.upload.path");
        // 配置 /profile/** 映射到文件系统路径
        registry.addResourceHandler("/profile/**").addResourceLocations("file:" + configByKey.getValue() + "/");
        if (configByKey != null) {
            registry.addResourceHandler("/profile/**").addResourceLocations("file:" + configByKey.getValue() + "/");
        }
    }
}