added download option, see #1

This commit is contained in:
Jottyfan
2024-01-13 15:59:57 +01:00
parent cffe483969
commit e568589181
5 changed files with 82 additions and 1 deletions

View File

@ -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();
}
}