diff --git a/client/src/main/java/steveonjava/client/CustomerModel.java b/client/src/main/java/steveonjava/client/CustomerModel.java index 7d34e78..2e273d4 100644 --- a/client/src/main/java/steveonjava/client/CustomerModel.java +++ b/client/src/main/java/steveonjava/client/CustomerModel.java @@ -50,13 +50,13 @@ public void setRestTemplate(RestTemplate restTemplate) { @SuppressWarnings("unchecked") public void loadData() { - Customer[] customers = restTemplate.getForObject("http://localhost:8080/crm/customers", Customer[].class); + Customer[] customers = restTemplate.getForObject("http://localhost:8080/javafx-spring-server/crm/customers", Customer[].class); this.customers.setAll(customers); } @Secured("ROLE_MANAGER") public void remove(Customer customer) { - restTemplate.delete("http://localhost:8080/crm/customer/" + customer.getId()); + restTemplate.delete("http://localhost:8080/javafx-spring-server/crm/customer/" + customer.getId()); customers.remove(customer); } @@ -65,7 +65,7 @@ public void addCustomer(String firstName, String lastName) { customer.setFirstName(firstName); customer.setLastName(lastName); customer.setSignupDate(new Date()); - Integer id = restTemplate.postForObject("http://localhost:8080/crm/customers", customer, Integer.class); + Integer id = restTemplate.postForObject("http://localhost:8080/javafx-spring-server/crm/customers", customer, Integer.class); customer.setId(id); customers.add(customer); } diff --git a/server/pom.xml b/server/pom.xml index eccb894..49a35eb 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -74,6 +74,11 @@ cglib 2.2.2 + + org.ow2.jonas.osgi + javaee-api + 5.0.5 +