관련사이트 이미지 안보이는 오류 수정

thkim
유민형 2024-06-12 17:45:18 +09:00
parent d50677efff
commit 3170d1a511
2 changed files with 10 additions and 5 deletions

View File

@ -507,7 +507,7 @@ public class AdminConfigController extends BaseController {
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님") @ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
}) })
@RequestMapping(method = RequestMethod.GET, value = "/about-site-mgt/list", consumes = MediaType.APPLICATION_JSON_VALUE) @RequestMapping(method = RequestMethod.GET, value = "/about-site-mgt/list", consumes = MediaType.APPLICATION_JSON_VALUE)
public ResultVO getPartnerSiteList(@AuthenticationPrincipal LoginVO user, HttpServletRequest request) throws Exception { public ResultVO getPartnerSiteList() throws Exception {
ResultVO resultVO = new ResultVO(); ResultVO resultVO = new ResultVO();
Map<String, Object> resultMap = new HashMap<>(); Map<String, Object> resultMap = new HashMap<>();
List<TnPartnerSite> tnPartnerSite = configService.selectPartnerSiteList(); List<TnPartnerSite> tnPartnerSite = configService.selectPartnerSiteList();
@ -537,10 +537,14 @@ public class AdminConfigController extends BaseController {
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님") @ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
}) })
@RequestMapping(method = RequestMethod.GET, value = "/about-site-mgt/get-site-image") @RequestMapping(method = RequestMethod.GET, value = "/about-site-mgt/get-site-image")
public void getSiteImage(@AuthenticationPrincipal LoginVO user, HttpServletRequest request, HttpServletResponse response, @RequestParam String fileGrpId) throws Exception { public void getSiteImage(HttpServletResponse response, @RequestParam String fileGrpId) throws Exception {
List<TnAttachFile> dbImgList = fileService.findByFileGrpId(fileGrpId); List<TnAttachFile> dbImgList = fileService.findByFileGrpId(fileGrpId);
String realFile = dbImgList.get(0).getFilePath(); String realFile = "";
String fileNm = dbImgList.get(0).getFileNewName(); String fileNm = "";
if (!dbImgList.isEmpty()) {
realFile = dbImgList.get(0).getFilePath();
fileNm = dbImgList.get(0).getFileNewName();
}
BufferedOutputStream out = null; BufferedOutputStream out = null;
InputStream in = null; InputStream in = null;

View File

@ -30,7 +30,8 @@ public class WebMvcConfig implements WebMvcConfigurer {
registry.addInterceptor(authCheckInterceptor) registry.addInterceptor(authCheckInterceptor)
.addPathPatterns("/admin/**") .addPathPatterns("/admin/**")
.excludePathPatterns( .excludePathPatterns(
"/admin/dashboard/**" "/admin/dashboard/**",
"/admin/config/about-site-mgt/get-site-image/**"
); );
} }
@Override @Override