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

相关文章

Python中Request的安装以及简单的使用方法图文教程

《Python中Request的安装以及简单的使用方法图文教程》python里的request库经常被用于进行网络爬虫,想要学习网络爬虫的同学必须得安装request这个第三方库,:本文主要介绍P... 目录1.Requests 安装cmd 窗口安装为pycharm安装在pycharm设置中为项目安装req

JavaWeb项目创建、部署、连接数据库保姆级教程(tomcat)

《JavaWeb项目创建、部署、连接数据库保姆级教程(tomcat)》:本文主要介绍如何在IntelliJIDEA2020.1中创建和部署一个JavaWeb项目,包括创建项目、配置Tomcat服务... 目录简介:一、创建项目二、tomcat部署1、将tomcat解压在一个自己找得到路径2、在idea中添加

Python + Streamlit项目部署方案超详细教程(非Docker版)

《Python+Streamlit项目部署方案超详细教程(非Docker版)》Streamlit是一款强大的Python框架,专为机器学习及数据可视化打造,:本文主要介绍Python+St... 目录一、针对 Alibaba Cloud linux/Centos 系统的完整部署方案1. 服务器基础配置(阿里

Spring IOC核心原理详解与运用实战教程

《SpringIOC核心原理详解与运用实战教程》本文详细解析了SpringIOC容器的核心原理,包括BeanFactory体系、依赖注入机制、循环依赖解决和三级缓存机制,同时,介绍了SpringBo... 目录1. Spring IOC核心原理深度解析1.1 BeanFactory体系与内部结构1.1.1

SpringBoot集成iText快速生成PDF教程

《SpringBoot集成iText快速生成PDF教程》本文介绍了如何在SpringBoot项目中集成iText9.4.0生成PDF文档,包括新特性的介绍、环境准备、Service层实现、Contro... 目录SpringBoot集成iText 9.4.0生成PDF一、iText 9新特性与架构变革二、环

2025最新版Android Studio安装及组件配置教程(SDK、JDK、Gradle)

《2025最新版AndroidStudio安装及组件配置教程(SDK、JDK、Gradle)》:本文主要介绍2025最新版AndroidStudio安装及组件配置(SDK、JDK、Gradle... 目录原生 android 简介Android Studio必备组件一、Android Studio安装二、A

前端Visual Studio Code安装配置教程之下载、汉化、常用组件及基本操作

《前端VisualStudioCode安装配置教程之下载、汉化、常用组件及基本操作》VisualStudioCode是微软推出的一个强大的代码编辑器,功能强大,操作简单便捷,还有着良好的用户界面,... 目录一、Visual Studio Code下载二、汉化三、常用组件1、Auto Rename Tag2

JavaScript装饰器从基础到实战教程

《JavaScript装饰器从基础到实战教程》装饰器是js中一种声明式语法特性,用于在不修改原始代码的情况下,动态扩展类、方法、属性或参数的行为,本文将从基础概念入手,逐步讲解装饰器的类型、用法、进阶... 目录一、装饰器基础概念1.1 什么是装饰器?1.2 装饰器的语法1.3 装饰器的执行时机二、装饰器的

MySQL 5.7彻底卸载与重新安装保姆级教程(附常见问题解决)

《MySQL5.7彻底卸载与重新安装保姆级教程(附常见问题解决)》:本文主要介绍MySQL5.7彻底卸载与重新安装保姆级教程的相关资料,步骤包括停止服务、卸载程序、删除文件和注册表项、清理环境... 目录一、彻底卸载旧版本mysql(核心步骤)二、MySQL 5.7重新安装与配置三、常见问题解决总结废话不多

全网最全Tomcat完全卸载重装教程小结

《全网最全Tomcat完全卸载重装教程小结》windows系统卸载Tomcat重新通过ZIP方式安装Tomcat,优点是灵活可控,适合开发者自定义配置,手动配置环境变量后,可通过命令行快速启动和管理... 目录一、完全卸载Tomcat1. 停止Tomcat服务2. 通过控制面板卸载3. 手动删除残留文件4.