mirror of https://github.com/elunez/eladmin
parent
58575378db
commit
9882cb97a7
|
@ -35,8 +35,8 @@ public class ConfigurerAdapter implements WebMvcConfigurer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||||
String avatarUtl = "file:" + avatar.replace("\\","/");
|
String avatarUtl = Paths.get(avatar).normalize().toUri().toASCIIString();
|
||||||
String pathUtl = "file:" + path.replace("\\","/");
|
String pathUtl = Paths.get(path).normalize().toUri().toASCIIString();
|
||||||
registry.addResourceHandler("/avatar/**").addResourceLocations(avatarUtl).setCachePeriod(0);
|
registry.addResourceHandler("/avatar/**").addResourceLocations(avatarUtl).setCachePeriod(0);
|
||||||
registry.addResourceHandler("/file/**").addResourceLocations(pathUtl).setCachePeriod(0);
|
registry.addResourceHandler("/file/**").addResourceLocations(pathUtl).setCachePeriod(0);
|
||||||
registry.addResourceHandler("/**").addResourceLocations("classpath:/META-INF/resources/").setCachePeriod(0);
|
registry.addResourceHandler("/**").addResourceLocations("classpath:/META-INF/resources/").setCachePeriod(0);
|
||||||
|
|
Loading…
Reference in New Issue