| | |
| | | package com.kidgrow.filecenter.config; |
| | | |
| | | import com.kidgrow.common.config.DefaultWebMvcConfig; |
| | | import com.kidgrow.common.constant.CommonConstant; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | |
| | | */ |
| | | @Configuration |
| | | public class WebMvcConfig extends DefaultWebMvcConfig { |
| | | |
| | | @Value("${spring.profiles.active}") |
| | | private String OssPathEn; |
| | | |
| | | @Override |
| | | public void addResourceHandlers(ResourceHandlerRegistry registry) { |
| | | registry.addResourceHandler("/"+OssPathEn+"/**").addResourceLocations("file:"+ CommonConstant.TEMP_IMAGE_PATH+"/"+OssPathEn+"/"); |
| | | } |
| | | } |