Skip to content

Commit

Permalink
Merge pull request #26 from Imsyp/main
Browse files Browse the repository at this point in the history
feat: read '/' as '_'
  • Loading branch information
Imsyp authored Sep 20, 2024
2 parents 19e0028 + 7736a81 commit 0584738
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 4 deletions.
Binary file not shown.
3 changes: 2 additions & 1 deletion server/build/resources/main/application.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
spring.application.name=swdc
spring.application.name=swdc
server.port=8090
Binary file not shown.
Binary file not shown.
Binary file modified server/build/tmp/compileJava/previous-compilation-data.bin
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ public class PriceController {
public Price getPriceInfo(@PathVariable String platform, HttpServletRequest request, @PathVariable String product_id) {
String restOfPath = (String) request.getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);
String bestMatchPattern = (String) request.getAttribute(HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE);
String category_name = new AntPathMatcher().extractPathWithinPattern(bestMatchPattern, restOfPath);
String category_name_with_separator = new AntPathMatcher().extractPathWithinPattern(bestMatchPattern, restOfPath);

category_name = UriUtils.decode(category_name, StandardCharsets.UTF_8);
category_name_with_separator = UriUtils.decode(category_name_with_separator, StandardCharsets.UTF_8);
String category_name = category_name_with_separator.replace("/", "_");

return priceService.getProductDetails(platform, category_name, product_id);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class PriceService {

/**
*
* file system에서 "fileSystemPath/platform/category_name/product_id.txt"에 해당하는 product의 가격 정보를 반환
* file system에서 "{fileSystemPath}/platform/category_name/product_id.txt"에 해당하는 product의 가격 정보를 반환
*
*/
public Price getProductDetails(String platform, String category_name, String product_id) {
Expand Down

0 comments on commit 0584738

Please sign in to comment.