@Override @RolesAllowed("ROLE_USER") public void addCustomer(@Valid @RequestBody Customer newCustomer) throws Exception { // TODO: somehow database auto generate timestamp not working newCustomer.setLastUpdate(new Date()); customerService.addCustomer(newCustomer); }
@Override @RolesAllowed("ROLE_USER") public Customer getCustomerByLogin(@PathVariable("login_id") @NotNull String id) throws Exception { return customerService.getCustomerByLogin(id); }