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); }