package com.unitedimaging.controller;
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.engine.data.JsonDataSource;
import net.sf.jasperreports.engine.export.JRPdfExporter;
import net.sf.jasperreports.export.SimpleExporterInput;
import net.sf.jasperreports.export.SimpleOutputStreamExporterOutput;
import org.apache.commons.io.FileUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.io.*;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
@Controller
public class UploadController {
@RequestMapping("/hello") //访问http://localhost:8080/hello,触发响应
@ResponseBody
public String hello() throws IOException, JRException{
'''
content
str_xx
'''
return str_xx;//返回字符串
}
}
Java springboot 响应url,返回str
最新推荐文章于 2023-02-13 09:16:17 发布