You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
601 B
27 lines
601 B
package crm.controller;
|
|
|
|
import crm.service.UserService;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.ui.Model;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
@Controller
|
|
public class Export {
|
|
|
|
private UserService userService;
|
|
|
|
public Export(UserService userService) {
|
|
this.userService = userService;
|
|
}
|
|
|
|
/**
|
|
* Handle request to download an Excel document
|
|
*/
|
|
@GetMapping("/download")
|
|
public String download(Model model) {
|
|
model.addAttribute("users", userService.listAllUsers());
|
|
return "";
|
|
}
|
|
|
|
}
|