Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. package com.jose.controllers;
  2. import org.springframework.beans.factory.annotation.Autowired;
  3. import org.springframework.stereotype.Controller;
  4. import org.springframework.web.bind.annotation.RequestMapping;
  5. import com.jose.services.HomeService;
  6.  
  7. @Controller
  8. public class HomeController {
  9.  
  10. @Autowired
  11. private HomeService servicio;
  12.  
  13.  
  14.  
  15. @RequestMapping("lista")
  16. public String lista() {
  17. return servicio.lista();
  18. }
  19.  
  20. @RequestMapping("eliminar")
  21. public String eliminar() {
  22. return "eliminar";
  23. }
  24. }
  25.  
  26. package com.jose.services;
  27.  
  28. import org.springframework.stereotype.Service;
  29.  
  30. @Service
  31. public class HomeService {
  32.  
  33. public String lista() {
  34. return "lista";
  35. }
  36.  
  37.  
  38. public String eliminar() {
  39. return "eliminar";
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement