package com.zjty.autotest.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * <p>Description : autotest
 * <p>Date : 2020/5/12 15:43
 * <p>@author : C
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        //项目相对路径+项目动态绝对路径
        String workPath = System.getProperty("user.dir");
        registry.addResourceHandler("/screenshot/**").
                addResourceLocations("file:" + "./screenshots/");
    }
}
