Jasperreports+jaspersoft studio学习教程(七)- 子报表Subreport(父子报表互相传值)

本文主要是介绍Jasperreports+jaspersoft studio学习教程(七)- 子报表Subreport(父子报表互相传值),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

 转载:https://blog.csdn.net/shiyun123zw/article/details/79221708

有很多人都说Jasperreports不适合中国式复杂报表,实际上运用好父子报表可以解决大部分问题了。例如下面的表。每个学生的学科数目不固定,且每个学生后有相当于小计的平均分。有点复杂度的报表,可以使用子报表解决。

8.1 设计报表模板

8.1.1 新建主模板DemoReport6_main.jrxml,创建Paramters :title(java.lang.String)、date(java.lang.String)、SUBREPORT_DIR(java.lang.String),创建Fields :stuNo(java.lang.Integer)、

stuName(java.lang.String)、subjectList(java.util.List)

 

8.1.2 设计模板表头如下,注意宽度:

8.1.3 新建子模板DemoReport6_sub.jrxml,只保留DetailBand(Height设置为20),并设置模板的宽500,高20,且四周Margin都为0

8.1.4 转到DemoReport6_main主模板,将Subreport组件拖入到Detail中,跳出Subreport界面

8.1.5 将stuNo和stuName拖入到Detail中

8.1.6 转到DemoReport6_sub子模板,新建Fields:subjectName(String)、teacherName(String)、score(java.lang.Double).拖入到Detail中,注意宽度和主模板保持一致

8.1.7 新建Variables,命名为averageScore

8.1.8 转回DemoReport6_mian主模块,新建Variables,命名为getAverageScore

拖入到Detail Band中,设置好字体样式

点击 $V{getAverageScore} 显示Properties,设置Appearance中Position Type选中为Fix Relation To Bottom(同样将“平均分”如此设置)

设置TextField的Evaluation Time 选中为Band

8.1.9 将Subreport、$F{stuNo}、$F{stuName}放进一个Element Group里,直接在source中添加(未找到图形化操作)

<detail>

       ...

           <elementGroup>

              <subreport>

                  ...

              </subreport>

              <textField>

                  ... <textFieldExpression><![CDATA[$F{stuNo}]]></textFieldExpression>

              </textField>

              <textField>

                  ...

                  <textFieldExpression><![CDATA[$F{stuName}]]></textFieldExpression>

              </textField>

           </elementGroup>

       ...

    </detail>

保存后:

8.1.10 点击 $F{stuNo} 显示Properties,设置Position Type 为Float,Stretch Type为 ElementGroupHeight,把stuNo和Subreport也如此设置。

8.1.11 点击Subreport 显示Properties,在Subreport中设置Exception为$P{SUBREPORT_DIR}+"DemoReport6_sub.jasper",Data Source Expression为

newnet.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{subjectList})

点击 Edit Return Values

保存主模板,子模板,放到项目中的jrxml中。

8.2 编写Servlet注入数据源

8.2.1 新建 Student类和Subject类

8.2.2 新建JasperServlet6,doGet内容如下:

8.3 启动tomcat,访问servlet,查看html文件

代码如下:

DemoReport6_main.jrxml

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.4.0.final using JasperReports Library version 6.4.1  -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="DemoReport6_main" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="0" bottomMargin="0" uuid="4d779d07-059d-4881-9a0c-d6c44c0cdb91"><property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/><property name="com.jaspersoft.studio.unit." value="pixel"/><property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/><property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/><property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/><property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/><property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/><property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/><property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/><property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/><parameter name="title" class="java.lang.String"><parameterDescription><![CDATA[]]></parameterDescription></parameter><parameter name="date" class="java.lang.String"><parameterDescription><![CDATA[]]></parameterDescription></parameter><parameter name="SUBREPORT_DIR" class="java.lang.String"/><queryString><![CDATA[]]></queryString><field name="stuNo" class="java.lang.Integer"/><field name="stuName" class="java.lang.String"/><field name="subjectList" class="java.util.List"/><variable name="getAverageScore" class="java.lang.Double" incrementType="Report"/><title><band height="60" splitType="Stretch"><property name="com.jaspersoft.studio.unit.height" value="pixel"/><textField><reportElement x="0" y="10" width="800" height="40" uuid="a8f8ea70-0699-4184-8528-a1a49a6e6544"><property name="com.jaspersoft.studio.unit.width" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="pixel"/></reportElement><textElement textAlignment="Center" verticalAlignment="Middle"><font fontName="微软雅黑" size="22"/></textElement><textFieldExpression><![CDATA[$P{title}]]></textFieldExpression></textField></band></title><pageHeader><band height="30" splitType="Stretch"><property name="com.jaspersoft.studio.unit.height" value="pixel"/><textField><reportElement x="500" y="0" width="300" height="30" uuid="976f9ea4-db44-4dd1-a3a1-e65d1d238a58"/><textElement textAlignment="Right" verticalAlignment="Middle"><font fontName="微软雅黑"/></textElement><textFieldExpression><![CDATA["日期:"+$P{date}]]></textFieldExpression></textField></band></pageHeader><columnHeader><band height="30"><property name="com.jaspersoft.studio.unit.height" value="pixel"/><textField><reportElement x="0" y="0" width="150" height="30" uuid="18eaa77b-a385-4568-af04-d5300f6153b4"><property name="com.jaspersoft.studio.unit.y" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/></reportElement><box><topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/><leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/><bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/><rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/></box><textElement textAlignment="Center" verticalAlignment="Middle"><font fontName="微软雅黑" size="16" isBold="true"/></textElement><textFieldExpression><![CDATA["学号"]]></textFieldExpression></textField><textField><reportElement x="150" y="0" width="150" height="30" uuid="edcbb21e-5fc3-4f21-ba73-728918007f8c"><property name="com.jaspersoft.studio.unit.y" value="pixel"/><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/></reportElement><box><topPen lineWidth="1.0"/><bottomPen lineWidth="1.0"/><rightPen lineWidth="1.0"/></box><textElement textAlignment="Center" verticalAlignment="Middle"><font fontName="微软雅黑" size="16" isBold="true"/></textElement><textFieldExpression><![CDATA["姓名"]]></textFieldExpression></textField><textField><reportElement x="300" y="0" width="200" height="30" uuid="5ddbb580-fdbe-4dd8-9ac7-1f3170127467"><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/></reportElement><box><topPen lineWidth="1.0"/><bottomPen lineWidth="1.0"/><rightPen lineWidth="1.0"/></box><textElement textAlignment="Center" verticalAlignment="Middle"><font fontName="微软雅黑" size="16" isBold="true"/></textElement><textFieldExpression><![CDATA["学科"]]></textFieldExpression></textField><textField><reportElement x="700" y="0" width="100" height="30" uuid="02f12719-113d-49ee-912e-26b3aff68f30"/><box><topPen lineWidth="1.0"/><bottomPen lineWidth="1.0"/><rightPen lineWidth="1.0"/></box><textElement textAlignment="Center" verticalAlignment="Middle"><font fontName="微软雅黑" size="16"/></textElement><textFieldExpression><![CDATA["分数"]]></textFieldExpression></textField><textField><reportElement x="500" y="0" width="200" height="30" uuid="ba3bd18e-3b52-4dd6-b8d5-fb08c89338d9"><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/></reportElement><box><topPen lineWidth="1.0"/><bottomPen lineWidth="1.0"/><rightPen lineWidth="1.0"/></box><textElement textAlignment="Center" verticalAlignment="Middle"><font fontName="微软雅黑" size="16"/></textElement><textFieldExpression><![CDATA["任课老师"]]></textFieldExpression></textField></band></columnHeader><detail><band height="40" splitType="Stretch"><property name="com.jaspersoft.studio.unit.height" value="pixel"/><elementGroup><subreport><reportElement positionType="Float" stretchType="ElementGroupHeight" x="300" y="0" width="500" height="20" uuid="8df8a2e2-cfda-40f4-9343-a873f2cde5cc"><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="pixel"/></reportElement><dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{subjectList})]]></dataSourceExpression><returnValue subreportVariable="averageScore" toVariable="getAverageScore"/><subreportExpression><![CDATA[$P{SUBREPORT_DIR}+"DemoReport6_sub.jasper"]]></subreportExpression></subreport><textField><reportElement positionType="Float" stretchType="ElementGroupHeight" x="0" y="0" width="150" height="20" uuid="5629043a-e904-4e34-8a1c-9660dac1bd8a"><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="pixel"/></reportElement><box><topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/><bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/><rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/></box><textElement textAlignment="Center" verticalAlignment="Middle"><font fontName="微软雅黑"/></textElement><textFieldExpression><![CDATA[$F{stuNo}]]></textFieldExpression></textField><textField><reportElement positionType="Float" stretchType="ElementGroupHeight" x="150" y="0" width="150" height="20" uuid="72721815-8bea-4fb8-ac90-931449976faf"><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="pixel"/></reportElement><box><topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/><leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/><rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/></box><textElement textAlignment="Center" verticalAlignment="Middle"><font fontName="微软雅黑"/></textElement><textFieldExpression><![CDATA[$F{stuName}]]></textFieldExpression></textField></elementGroup><textField><reportElement positionType="FixRelativeToBottom" x="0" y="20" width="700" height="20" uuid="0dfb2d9d-d9cf-4e45-b854-3aa76e841231"><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="pixel"/></reportElement><box><topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/><leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/><bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/><rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/></box><textElement textAlignment="Center" verticalAlignment="Middle"><font fontName="微软雅黑" isBold="true"/></textElement><textFieldExpression><![CDATA["平均分"]]></textFieldExpression></textField><textField evaluationTime="Band"><reportElement positionType="FixRelativeToBottom" x="700" y="20" width="100" height="20" uuid="17c98f34-8b86-4047-8a12-e7d03b5153de"><property name="com.jaspersoft.studio.unit.x" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="pixel"/></reportElement><box><topPen lineWidth="1.0"/><bottomPen lineWidth="1.0"/><rightPen lineWidth="1.0"/></box><textElement textAlignment="Center" verticalAlignment="Middle"><font fontName="微软雅黑"/></textElement><textFieldExpression><![CDATA[$V{getAverageScore}]]></textFieldExpression></textField></band></detail><pageFooter><band height="30" splitType="Stretch"><textField><reportElement x="680" y="5" width="100" height="20" uuid="8b559f20-e4a7-4b90-b46a-ac1575514392"><property name="com.jaspersoft.studio.unit.height" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="pixel"/></reportElement><textElement textAlignment="Center" verticalAlignment="Middle"><font fontName="微软雅黑"/></textElement><textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression></textField></band></pageFooter>
</jasperReport>

DemoReport6_sub.jrxml

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.4.0.final using JasperReports Library version 6.4.1  -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="DemoReport6_sub" pageWidth="500" pageHeight="20" orientation="Landscape" columnWidth="500" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="9761aedd-513e-48ff-8cb6-60f038ffbaab"><property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/><property name="com.jaspersoft.studio.unit." value="pixel"/><queryString><![CDATA[]]></queryString><field name="subjectName" class="java.lang.String"/><field name="teacherName" class="java.lang.String"/><field name="score" class="java.lang.Double"/><variable name="averageScore" class="java.lang.Double" calculation="Average"><variableExpression><![CDATA[$F{score}]]></variableExpression></variable><detail><band height="20" splitType="Stretch"><property name="com.jaspersoft.studio.unit.height" value="pixel"/><textField><reportElement x="0" y="0" width="200" height="20" uuid="4715047e-672e-4b21-81d5-1b7f433938e7"><property name="com.jaspersoft.studio.unit.x" value="pixel"/></reportElement><box><topPen lineWidth="1.0"/><leftPen lineWidth="1.0"/><bottomPen lineWidth="1.0"/><rightPen lineWidth="1.0"/></box><textElement textAlignment="Center" verticalAlignment="Middle"><font fontName="微软雅黑"/></textElement><textFieldExpression><![CDATA[$F{subjectName}]]></textFieldExpression></textField><textField><reportElement x="200" y="0" width="200" height="20" uuid="7bf63b11-eb47-460a-978a-395b33fb480d"/><box><topPen lineWidth="1.0"/><bottomPen lineWidth="1.0"/><rightPen lineWidth="1.0"/></box><textElement textAlignment="Center" verticalAlignment="Middle"><font fontName="微软雅黑"/></textElement><textFieldExpression><![CDATA[$F{teacherName}]]></textFieldExpression></textField><textField><reportElement x="400" y="0" width="100" height="20" uuid="c603aad8-9ba2-4994-90c3-86e37cb46f33"><property name="com.jaspersoft.studio.unit.x" value="pixel"/></reportElement><box><topPen lineWidth="1.0"/><bottomPen lineWidth="1.0"/><rightPen lineWidth="1.0"/></box><textElement textAlignment="Center" verticalAlignment="Middle"><font fontName="微软雅黑"/></textElement><textFieldExpression><![CDATA[$F{score}]]></textFieldExpression></textField></band></detail>
</jasperReport>

Student.java

package com.jasper.bean;import java.util.ArrayList;
import java.util.List;public class Student {private Integer stuNo;private String stuName;private List<Subject> subjectList = new ArrayList<Subject>();public Integer getStuNo() {return stuNo;}public void setStuNo(Integer stuNo) {this.stuNo = stuNo;}public String getStuName() {return stuName;}public void setStuName(String stuName) {this.stuName = stuName;}public List<Subject> getSubjectList() {return subjectList;}public void setSubjectList(List<Subject> subjectList) {this.subjectList = subjectList;}}

Subject.java

package com.jasper.bean;public class Subject {private String subjectName;private String teacherName;private Double score;public String getSubjectName() {return subjectName;}public void setSubjectName(String subjectName) {this.subjectName = subjectName;}public String getTeacherName() {return teacherName;}public void setTeacherName(String teacherName) {this.teacherName = teacherName;}public Double getScore() {return score;}public void setScore(Double score) {this.score = score;}public Subject(String subjectName, String teacherName, Double score) {super();this.subjectName = subjectName;this.teacherName = teacherName;this.score = score;}public Subject() {super();}}

JasperServlet6.java

package com.jasper.web;import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;import com.jasper.bean.Student;
import com.jasper.bean.Subject;@WebServlet("/JasperServlet6")
public class JasperServlet6 extends HttpServlet {private static final long serialVersionUID = 1L;public JasperServlet6() {super();}protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {Map<String,Object> parameters = new HashMap<String,Object>(16);//组装list数据源Subject sub1 = new Subject("语文","张老师",80.0);Subject sub2 = new Subject("数学","王老师",90.0);Subject sub3 = new Subject("物理","孙老师",46.0);Subject sub4 = new Subject("政治","李老师",50.0);List<Student> list = new ArrayList<Student>();Student stu1 = new Student();stu1.setStuNo(101);stu1.setStuName("小明");List<Subject> sublist1 = new ArrayList<Subject>();sublist1.add(sub1);sublist1.add(sub2);stu1.setSubjectList(sublist1);Student stu2 = new Student();stu2.setStuNo(102);stu2.setStuName("小雨");List<Subject> sublist2 = new ArrayList<Subject>();sublist2.add(sub2);sublist2.add(sub3);sublist2.add(sub4);stu2.setSubjectList(sublist2);Student stu3 = new Student();stu3.setStuNo(103);stu3.setStuName("小东");List<Subject> sublist3 = new ArrayList<Subject>();sublist3.add(sub4);sublist3.add(sub3);stu3.setSubjectList(sublist3);list.add(stu1);list.add(stu2);list.add(stu3);String mainjrxmlPath = request.getServletContext().getRealPath("/")+"/jrxml/DemoReport6_main.jrxml";String subjrxmlPath = request.getServletContext().getRealPath("/")+"/jrxml/DemoReport6_sub.jrxml";//由jrxml文件编译后生产jasper文件的路径String mainjasperPath = request.getServletContext().getRealPath("/")+"/jasper/DemoReport6_main.jasper";String subjasperPath = request.getServletContext().getRealPath("/")+"/jasper/DemoReport6_sub.jasper";try {//编译jrxml生产jasper文件JasperCompileManager.compileReportToFile(mainjrxmlPath, mainjasperPath);JasperCompileManager.compileReportToFile(subjrxmlPath, subjasperPath);parameters.put("title", "学生成绩表");parameters.put("date", new SimpleDateFormat("yyyy-MM-dd").format(new Date()));String SUBREPORT_DIR = request.getServletContext().getRealPath("/")+"/jasper/";parameters.put("SUBREPORT_DIR",SUBREPORT_DIR);JasperPrint jasperPrint = JasperFillManager.fillReport(mainjasperPath, parameters, new JRBeanCollectionDataSource(list));//生成html文件(位置:D:/student.html)JasperExportManager.exportReportToHtmlFile(jasperPrint, "D:/student.html");} catch (JRException e) {e.printStackTrace();}}protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {doGet(request, response);}}

 

这篇关于Jasperreports+jaspersoft studio学习教程(七)- 子报表Subreport(父子报表互相传值)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1146935

相关文章

龙蜥操作系统Anolis OS-23.x安装配置图解教程(保姆级)

《龙蜥操作系统AnolisOS-23.x安装配置图解教程(保姆级)》:本文主要介绍了安装和配置AnolisOS23.2系统,包括分区、软件选择、设置root密码、网络配置、主机名设置和禁用SELinux的步骤,详细内容请阅读本文,希望能对你有所帮助... ‌AnolisOS‌是由阿里云推出的开源操作系统,旨

PyTorch使用教程之Tensor包详解

《PyTorch使用教程之Tensor包详解》这篇文章介绍了PyTorch中的张量(Tensor)数据结构,包括张量的数据类型、初始化、常用操作、属性等,张量是PyTorch框架中的核心数据结构,支持... 目录1、张量Tensor2、数据类型3、初始化(构造张量)4、常用操作5、常用属性5.1 存储(st

Java操作PDF文件实现签订电子合同详细教程

《Java操作PDF文件实现签订电子合同详细教程》:本文主要介绍如何在PDF中加入电子签章与电子签名的过程,包括编写Word文件、生成PDF、为PDF格式做表单、为表单赋值、生成文档以及上传到OB... 目录前言:先看效果:1.编写word文件1.2然后生成PDF格式进行保存1.3我这里是将文件保存到本地后

windows系统下shutdown重启关机命令超详细教程

《windows系统下shutdown重启关机命令超详细教程》shutdown命令是一个强大的工具,允许你通过命令行快速完成关机、重启或注销操作,本文将为你详细解析shutdown命令的使用方法,并提... 目录一、shutdown 命令简介二、shutdown 命令的基本用法三、远程关机与重启四、实际应用

python库fire使用教程

《python库fire使用教程》本文主要介绍了python库fire使用教程,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧... 目录1.简介2. fire安装3. fire使用示例1.简介目前python命令行解析库用过的有:ar

LinuxMint怎么安装? Linux Mint22下载安装图文教程

《LinuxMint怎么安装?LinuxMint22下载安装图文教程》LinuxMint22发布以后,有很多新功能,很多朋友想要下载并安装,该怎么操作呢?下面我们就来看看详细安装指南... linux Mint 是一款基于 Ubuntu 的流行发行版,凭借其现代、精致、易于使用的特性,深受小伙伴们所喜爱。对

使用Nginx来共享文件的详细教程

《使用Nginx来共享文件的详细教程》有时我们想共享电脑上的某些文件,一个比较方便的做法是,开一个HTTP服务,指向文件所在的目录,这次我们用nginx来实现这个需求,本文将通过代码示例一步步教你使用... 在本教程中,我们将向您展示如何使用开源 Web 服务器 Nginx 设置文件共享服务器步骤 0 —

Golang使用minio替代文件系统的实战教程

《Golang使用minio替代文件系统的实战教程》本文讨论项目开发中直接文件系统的限制或不足,接着介绍Minio对象存储的优势,同时给出Golang的实际示例代码,包括初始化客户端、读取minio对... 目录文件系统 vs Minio文件系统不足:对象存储:miniogolang连接Minio配置Min

手把手教你idea中创建一个javaweb(webapp)项目详细图文教程

《手把手教你idea中创建一个javaweb(webapp)项目详细图文教程》:本文主要介绍如何使用IntelliJIDEA创建一个Maven项目,并配置Tomcat服务器进行运行,过程包括创建... 1.启动idea2.创建项目模板点击项目-新建项目-选择maven,显示如下页面输入项目名称,选择

Python基于火山引擎豆包大模型搭建QQ机器人详细教程(2024年最新)

《Python基于火山引擎豆包大模型搭建QQ机器人详细教程(2024年最新)》:本文主要介绍Python基于火山引擎豆包大模型搭建QQ机器人详细的相关资料,包括开通模型、配置APIKEY鉴权和SD... 目录豆包大模型概述开通模型付费安装 SDK 环境配置 API KEY 鉴权Ark 模型接口Prompt