Collector findByProductID
This commit is contained in:
parent
b800e1929e
commit
6f032947c2
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user