From 70abe8569c564357e1fad2692c2fef59e8a6a567 Mon Sep 17 00:00:00 2001 From: insanity Date: Wed, 16 Nov 2016 17:26:33 +0900 Subject: [PATCH] Collector --- .../java/com/loafle/bridge/collector/CollectorController.java | 2 +- .../java/com/loafle/bridge/collector/CollectorRepository.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/loafle/bridge/collector/CollectorController.java b/src/main/java/com/loafle/bridge/collector/CollectorController.java index a4cf62e..6d5b039 100644 --- a/src/main/java/com/loafle/bridge/collector/CollectorController.java +++ b/src/main/java/com/loafle/bridge/collector/CollectorController.java @@ -14,7 +14,7 @@ public class CollectorController { private CollectorRepository repository; @RequestMapping(value = "/collector/{productId}", method = RequestMethod.GET) - public Collector get(@PathVariable(value = "productId") long productId) { + public Collector get(@PathVariable(value = "productId") String productId) { return repository.findByPID(productId); } diff --git a/src/main/java/com/loafle/bridge/collector/CollectorRepository.java b/src/main/java/com/loafle/bridge/collector/CollectorRepository.java index e925b97..a6629b0 100644 --- a/src/main/java/com/loafle/bridge/collector/CollectorRepository.java +++ b/src/main/java/com/loafle/bridge/collector/CollectorRepository.java @@ -12,5 +12,5 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource; public interface CollectorRepository extends JpaRepository { @Query("SELECT c FROM Collector c where c.productId = :productId") - Collector findByPID(@Param("productId") Long productId); + Collector findByPID(@Param("productId") String productId); }