Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Controller
- public class timesheetController
- {
- @Autowired
- private CustomerDAO customerDAO;
- @GetMapping("/getCustomers")
- public String getCustomers(Model view)
- {
- //get customers from dao
- List<Customer> results = customerDAO.getCustomers();
- //add the customers to the model
- view.addAttribute("customers", results);
- return "list-customers";
- }
- }
- {
- "Customer_Code": T77A,
- "Customer_Name": CustomerName1
- },
- {
- "Customer_Code": T77B,
- "Customer_Name": CustomerName2
- }
- @Controller
- public class timesheetController
- {
- @Autowired
- private CustomerDAO customerDAO;
- @GetMapping("/getCustomers")
- public List<Customer> getCustomers()
- {
- //get customers from dao
- List<Customer> results = customerDAO.getCustomers();
- return results;
- }
- }
Add Comment
Please, Sign In to add comment