Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions client/src/main/java/steveonjava/client/CustomerModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}
Expand Down
5 changes: 5 additions & 0 deletions server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@
<artifactId>cglib</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>org.ow2.jonas.osgi</groupId>
<artifactId>javaee-api</artifactId>
<version>5.0.5</version>
</dependency>
</dependencies>
<repositories>
<!-- For testing against latest Spring snapshots -->
Expand Down