From 6f032947c2bbe8eeb434ed7e045a8545c21d7211 Mon Sep 17 00:00:00 2001 From: insanity Date: Wed, 16 Nov 2016 18:47:14 +0900 Subject: [PATCH] Collector findByProductID --- .../bridge/collector/CollectorController.java | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/main/java/com/loafle/bridge/collector/CollectorController.java b/src/main/java/com/loafle/bridge/collector/CollectorController.java index 093df0a..e32cd5f 100644 --- a/src/main/java/com/loafle/bridge/collector/CollectorController.java +++ b/src/main/java/com/loafle/bridge/collector/CollectorController.java @@ -6,8 +6,6 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; -import java.util.Date; - /** * Created by root on 16. 11. 15. */ @@ -18,24 +16,9 @@ public class CollectorController { @Autowired private CollectorRepository repository; - @RequestMapping(value = "/collector/{productId}", method = RequestMethod.GET) + @RequestMapping(value = "/collector/p/{productId}", method = RequestMethod.GET) public Collector getByProductId(@PathVariable String productId) { return repository.findByPID(productId); } - @RequestMapping(value = "/test", method = RequestMethod.GET) - public void test() { - - Collector c = new Collector(); - c.setVersion("1.0.0"); - c.setConfigPath("/root"); - c.setInstallDate(new Date()); - c.setUpdateDate(new Date()); - c.setLicenseDueDate(new Date()); - c.setProductId("1111111"); - repository.save(c); - - } - - }