completed group batch feature
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package zw.qantra.tm.configs;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
import java.nio.file.Path;
|
||||
|
||||
@Configuration
|
||||
public class ReportsResourceConfig implements WebMvcConfigurer {
|
||||
|
||||
@Value("${app.reports.storage-path:./reports}")
|
||||
private String reportsStoragePath;
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
Path reportsDir = Path.of(reportsStoragePath).toAbsolutePath();
|
||||
registry.addResourceHandler("/reports/**")
|
||||
.addResourceLocations("file:" + reportsDir + "/");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user