| | |
| | | package com.gk.hotwork.Config.Cors; |
| | | |
| | | import com.gk.hotwork.Config.attachment.FilePathConfig; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.web.servlet.config.annotation.CorsRegistry; |
| | |
| | | private String taskPath; |
| | | @Value("${emergencyPlanPath}") |
| | | private String emergencyPlanPath; |
| | | |
| | | @Value("${file.path.dcPath}") |
| | | private String dcPath; |
| | | |
| | | @Value("${file.path.urlRootPath}") |
| | | private String urlRootPath; |
| | | |
| | | |
| | | @Override |
| | |
| | | .addResourceLocations("file:" + taskPath); |
| | | registry.addResourceHandler("/upload/emergencyPlan/**") |
| | | .addResourceLocations("file:" + emergencyPlanPath); |
| | | registry.addResourceHandler("/uploadfile/**") |
| | | .addResourceLocations("file:" + dcPath); |
| | | } |
| | | } |