|
@ -4,6 +4,7 @@ import com.yihu.wlyy.interceptors.DoctorInterceptor;
|
|
import com.yihu.wlyy.interceptors.GateWayInterceptor;
|
|
import com.yihu.wlyy.interceptors.GateWayInterceptor;
|
|
import com.yihu.wlyy.interceptors.PatientInterceptor;
|
|
import com.yihu.wlyy.interceptors.PatientInterceptor;
|
|
import com.yihu.wlyy.interceptors.UserAgentFilter;
|
|
import com.yihu.wlyy.interceptors.UserAgentFilter;
|
|
|
|
import com.yihu.wlyy.util.SystemConf;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -12,6 +13,7 @@ import org.springframework.context.annotation.Bean;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.context.annotation.Profile;
|
|
import org.springframework.context.annotation.Profile;
|
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
|
|
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
|
|
|
|
|
/**
|
|
/**
|
|
@ -77,4 +79,12 @@ public class MvcConfig extends WebMvcConfigurerAdapter {
|
|
// mappingJackson2HttpMessageConverter.setObjectMapper(objectMapper);
|
|
// mappingJackson2HttpMessageConverter.setObjectMapper(objectMapper);
|
|
// converters.add(mappingJackson2HttpMessageConverter);
|
|
// converters.add(mappingJackson2HttpMessageConverter);
|
|
// }
|
|
// }
|
|
|
|
@Override
|
|
|
|
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
|
|
|
String tempPath = SystemConf.getInstance().getTempPath() ;
|
|
|
|
registry.addResourceHandler(tempPath+"/**").addResourceLocations("file:F:"+tempPath);
|
|
|
|
|
|
|
|
super.addResourceHandlers(registry);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
}
|