30 lines
750 B
Java
30 lines
750 B
Java
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();
|
|
}
|
|
}
|