added download option, see #1
This commit is contained in:
@ -0,0 +1,29 @@
|
||||
package de.jottyfan.bico.modules.download;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||
|
||||
import de.jottyfan.bico.modules.CommonController;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
public class DownloadController extends CommonController {
|
||||
|
||||
@Autowired
|
||||
private DownloadService service;
|
||||
|
||||
@GetMapping(value = "/download", produces = "text/csv")
|
||||
@ResponseBody
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
public String download() {
|
||||
return service.getCsv();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user