소스 검색

bug修改

chenweida 7 년 전
부모
커밋
5a6a8e955f
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/config/MvcConfig.java

+ 5 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/config/MvcConfig.java

@ -12,6 +12,7 @@ import org.springframework.boot.context.embedded.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
@ -20,7 +21,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
 * Created by chenweida on 2017/4/6.
 */
@Configuration
@Profile({"test", "prod"})
//@Profile({"test", "prod"})
public class MvcConfig extends WebMvcConfigurerAdapter {
    private Logger logger = LoggerFactory.getLogger(MvcConfig.class);
@ -82,9 +83,11 @@ public class MvcConfig extends WebMvcConfigurerAdapter {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        String tempPath = SystemConf.getInstance().getTempPath() ;
        registry.addResourceHandler(tempPath+"/**").addResourceLocations("file:F:"+tempPath);
        registry.addResourceHandler(tempPath+"/**").addResourceLocations("file:F:"+tempPath+"/");
        super.addResourceHandlers(registry);
    }
}