讲IDOC生成的XML文件转化为excel文件的方法

2024-04-24 07:18
文章标签 xml excel 方法 生成 转化 idoc

本文主要是介绍讲IDOC生成的XML文件转化为excel文件的方法,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

官方教程:http://help.sap.com/saphelp_erp2004/helpdata//EN/e3/7d4719ca581441b6841f1054ff1326/frameset.htm

关于转化的命令和基本格式都在里面

Command Overview

 

Command

Description

<tt:apply ...>

Calls a subtemplate

<tt:assign ...>

Assigns a value to data

<tt:attribute ...>

Defines a non-literal attribute

<tt:call ...>

Calls an ST program

<tt:clear ...>

Initializes data

<tt:cond ...>

Defines a conditioned transformation

<tt:cond-var ...>

Defines a condition for variables

<tt:context ...>

Defines a context for local data roots in subtemplates

<tt:copy ...>

Transforms any data objects to asXML

<tt:d-cond ...>

Defines a conditioned transformation for deserialization

<tt:deserialize ...>

Defines the direction of the transformation

<tt:empty ...>

Defines an empty pattern

<tt:group ...>

Defines a group of conditioned transformations

<tt:include ...>

Includes an ST program

<... tt:lax=?...? ...>

Controls the name comparison of literal XML elements

<tt:loop ...>

Transforms internal tables

<tt:namespace ...>

Declares a namespace

<tt:parameter ...>

Declares a parameter

<tt:read ...>

Reads a variable from XML

<tt:ref ...>

Sets the current node in the own context

<... tt:ref=?...? ...>

Sets the current node for a literal XML element

<tt:root ...>

Declares a data root

<tt:serialize ...>

Defines the direction of the transformation

<tt:s-cond ...>

Defines a conditioned transformation for the serialization

<tt:skip ...>

Skips XML elements during deserialization

<tt:switch ...>

Defines a case distinction between conditioned transformations

<tt:switch-var ...>

Defines a case distinction for variables

<tt:template ...>

Defines a main template or subtemplates

<tt:text ...>

Explicitly identifies a literal text

<tt:transform ...>

Root element of an ST program

<tt:value ...>

Transforms elementary data objects

<... tt:value-ref =?...? ...>

Short form for transformation of elementary data objects inliteral XML elements

<tt:variable ...>

Declares a variable

<tt:with-parameter ...>

Passes values to called ST programs and subtemplates

<tt:with-root ...>

Passes data nodes to called ST programs and subtemplates

<tt:write ...>

Writes the value of a variable to XML

 


下面写一个具体的实例


程序实现把转换好的文件保存为xml

ZTEST_GLB_TRANS


*&---------------------------------------------------------------------*
*& Report  ZTEST_GLB_TRANS
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  ztest_glb_trans.
TYPESBEGIN OF xml_line,
data(100TYPE c,
END OF xml_line.

DATA:
lv_xml TYPE string,
it_xml TYPE TABLE OF xml_line.


DATABEGIN OF l_header,
        title1(100)   TYPE c,
        title2(100)   TYPE c,
        cus_name(100TYPE c,
        cus_val(100)  TYPE c,
        con_date(100TYPE c,
        con_val(100)  TYPE c,
        con_term(100TYPE c,
        con_tval(100TYPE c,
        quo_date(100TYPE c,
        quo_comm(100)  TYPE c,
        rep_date(100TYPE c,
        quo_no(100)   TYPE c,
        qty(100)  TYPE c,
        cond(100type c,
        type(100type c,
        des(100type c,
        amou(100type c,
        Unit(100type c,
END OF l_header.

DATA td_header LIKE TABLE OF l_header.


DATABEGIN OF l_item,
        item_type      type c,  "Package = ‘P’; Offer = ‘O’; Good = ‘G’; Subtotal = ‘S’
        mat_des(100)   TYPE c,
        mat_num(100)   type c,
        qty(100)       TYPE c,
        cond(100)      type c,
        con_des(100)   type c,
        amou(100)      type c,
        Unit(100)      type c,
END OF l_item.
DATA td_item LIKE TABLE OF l_item.


PERFORM get_data.

* call XML
CALL TRANSFORMATION ZMPS_PRICING_VALIDATE_XML
SOURCE it_header = td_header
       it_item_data = td_item
RESULT XML  lv_xml.

CALL FUNCTION 'SCMS_STRING_TO_FTEXT'
  EXPORTING
    text      = lv_xml
  TABLES
    ftext_tab = it_xml.
***download
CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
    filename = 'C:\Test01.xls'
    filetype = 'BIN'
  TABLES
    data_tab = it_xml.

WRITE:lv_xml.
*&---------------------------------------------------------------------*
*&      Form  GET_DATA
*&---------------------------------------------------------------------*
FORM get_data .
    l_header-title1   = 'Managed Print Services'.
    l_header-title2   = 'Pricing Validation Report'.
    l_header-cus_name = 'Customer'.
    l_header-cus_val  = 'ABC Ltd'.
    l_header-con_date = 'Contract Start Date'.
    l_header-con_val  = '8/1/2011'.
    l_header-con_term = 'Contract Term (months)'.
    l_header-con_tval = '48'.
    l_header-quo_date = 'Quote Date: 07/01/2011'.
    l_header-quo_comm  = 'Valid for 45 days'.
    l_header-rep_date = 'Report Date 07/01/2011'.
    l_header-quo_no   = 'Quote Ref: 123-456'.
    l_header-qty  = 'Qty'.
    l_header-cond = 'Condition'.
    l_header-type = 'type'.
    l_header-des = 'Discription'.
    l_header-amou = 'Amounts'.
    l_header-Unit = 'Unit'.
  APPEND l_header TO td_header.

  CLEAR l_item.
  l_item-mat_des = 'Package'.
  l_item-item_type = 'P'.
  APPEND l_item TO td_item.
  CLEAR l_item.

  l_item-mat_des = 'HP Hardware support'.
  l_item-item_type = 'O'.
  APPEND l_item TO td_item.
  CLEAR l_item.

  l_item-mat_des = 'HP LaserJet 4345MFP Printer'.
  l_item-mat_num = 'Q3942A'.
  l_item-qty    = '15'.
  l_item-cond   = 'ZA73'.
  l_item-con_des   = 'Gross Monthly Base Price (Amount Based)'.
  l_item-amou   = '1200'.
  l_item-unit   = 'Dolllar'.
  APPEND l_item TO td_item.
  CLEAR l_item.

  l_item-cond   = 'YA9F'.
  l_item-con_des   = 'Item Discount on Base Price (Amount Based)'.
  l_item-amou   = '200'.
  l_item-unit   = 'Dolllar'.
  APPEND l_item TO td_item.
  CLEAR l_item.

  l_item-cond   = 'ZM97'.
  l_item-con_des   = 'Uplift on Unit Color Click Price'.
  l_item-amou   = '0'.
  l_item-unit   = 'Dollar Amt Per 1000'.
  APPEND l_item TO td_item.
  CLEAR l_item.

  l_item-con_des   = 'Sub Totals'.
  l_item-amou   = '1200'.
  l_item-item_type   = 'S'.
  APPEND l_item TO td_item.
  CLEAR l_item.

  l_item-con_des   = 'Tax'.
  l_item-amou   = '200'.
  l_item-item_type   = 'S'.
  APPEND l_item TO td_item.
  clear l_item.
ENDFORM.                    " GET_DATA


输入tcode;strans。

ZMPS_PRICING_VALIDATE_XML
<?sap.transform simple?>
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates">

  <tt:root name="it_header"/>
  <tt:root name="it_item_data"/>

  <tt:template>
    <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
              xmlns:o="urn:schemas-microsoft-com:office:office"
              xmlns:x="urn:schemas-microsoft-com:office:excel"
              xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
              xmlns:html="http://www.w3.org/TR/REC-html40"
              xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
      </ExcelWorkbook>
       <Styles>
          <Style ss:ID="s01">
           <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="10" ss:Color="#000000"
            ss:Italic="1"/>
          </Style>
            <Style ss:ID="s02">
           <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
          </Style>
          <Style ss:ID="s03">
           <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
           <Borders/>
           <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="14" ss:Color="#000000"
            ss:Bold="1" ss:Italic="1"/>
           <Interior/>
           <NumberFormat/>
           <Protection/>
          </Style>
          <Style ss:ID="s04">
           <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
           <Borders/>
           <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="14" ss:Color="#000000"
            ss:Bold="1"/>
           <Interior/>
           <NumberFormat/>
           <Protection/>
          </Style>
          <Style ss:ID="s05">
           <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
          </Style>
          <Style ss:ID="s06">
           <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"
            ss:Bold="1"/>
          </Style>
          <Style ss:ID="s07">
           <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="12" ss:Color="#000000"
            ss:Bold="1"/>
          </Style>

          <Style ss:ID="s08">
           <Borders>
            <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="2"/>
           </Borders>
          </Style>
          <Style ss:ID="s09">
           <Borders>
            <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="2"/>
           </Borders>
          </Style>
          <Style ss:ID="s10">
           <Borders>
            <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="2"/>
            <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="2"/>
           </Borders>
          </Style>
          <Style ss:ID="s11">
           <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
           <Font  ss:FontName="Calibri" x:Family="Swiss"/>
            <Borders>
            <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
           </Borders>
          </Style>
          <Style ss:ID="s12">
           <Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
            <Borders>
            <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
           </Borders>
          </Style>
          <Style ss:ID="s13">
            <Borders>
            <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
           </Borders>
          </Style>
      </Styles>

      <Worksheet ss:Name="Pricing validation">
        <Table ss:ExpandedColumnCount="50" x:FullColumns="1" x:FullRows="1">
           <Column ss:Index="2"  ss:Width="180"/>
           <Column ss:Index="10" ss:Width="200"/>
           <Column ss:Index="15" ss:Width="90"/>
          <tt:loop name="header" ref=".it_header">
            <Row>
              <Cell ss:Index="9" ss:StyleID="s03">
                <Data ss:Type="String">
                  <tt:value ref="$header.title1"/>          <!--Managed Print Services-->
                </Data>
              </Cell>
              <Cell ss:Index="16" ss:StyleID="s08">
              </Cell>
            </Row>

            <Row>
              <Cell ss:Index="9" ss:StyleID="s04">
                <Data ss:Type="String">
                  <tt:value ref="$header.title2"/>          <!--Pricing Validation Report-->
                </Data>
              </Cell>
              <Cell ss:Index="16" ss:StyleID="s08">
              </Cell>
            </Row>

            <Row>
              <Cell ss:Index="2">
                <Data ss:Type="String">
                  <tt:value ref="$header.cus_name"/>                 <!--Customer-->
                </Data>
              </Cell>
              <Cell ss:Index="3">
                <Data ss:Type="String">
                  <tt:value ref="$header.cus_val"/>                  <!--Customer value-->
                </Data>
              </Cell>
              <Cell ss:Index="16" ss:StyleID="s08">
              </Cell>
            </Row>

            <Row>
              <Cell ss:Index="2">
                <Data ss:Type="String">
                  <tt:value ref="$header.con_date"/>        <!--Contract Start Date-->
                </Data>
              </Cell>
              <Cell ss:Index="3">
                <Data ss:Type="String">
                  <tt:value ref="$header.con_val"/>        <!--Contract Start Date value-->
                </Data>
              </Cell>
              <Cell ss:Index="16" ss:StyleID="s08">
              </Cell>
            </Row>

            <Row>
              <Cell ss:Index="2">
                <Data ss:Type="String">
                  <tt:value ref="$header.con_term"/>         <!--Contract Term (months)-->
                </Data>
              </Cell>
              <Cell ss:Index="3">
                <Data ss:Type="String">
                  <tt:value ref="$header.con_tval"/>     <!--Contract Term (months) value-->
                </Data>
              </Cell>
              <Cell ss:Index="14">
                <Data ss:Type="String">
                  <tt:value ref="$header.rep_date"/>      <!--Report Date + ref value-->
                </Data>
              </Cell>
              <Cell ss:Index="16" ss:StyleID="s08">
              </Cell>
            </Row>

            <Row>
              <Cell ss:Index="2">
                <Data ss:Type="String">
                  <tt:value ref="$header.quo_date"/>         <!--Quote Date: + ref value-->
                </Data>
              </Cell>

              <Cell ss:Index="3">
                <Data ss:Type="String">
                  <tt:value ref="$header.quo_comm"/>      <!--Valid for 45 days-->
                </Data>
              </Cell>
              <Cell ss:Index="14">
                <Data ss:Type="String">
                  <tt:value ref="$header.quo_no"/>       <!--Quote Ref: + ref value-->
                </Data>
              </Cell>
              <Cell ss:Index="16" ss:StyleID="s08">
              </Cell>
            </Row>

            <Row>
              <Cell>
                <Data ss:Type="String"/>
              </Cell>
              <Cell ss:Index="16" ss:StyleID="s08">
              </Cell>
            </Row>

          <Row>
              <Cell ss:Index="8" ss:StyleID="s05">
                <Data ss:Type="String">
                  <tt:value ref="$header.cond"/>          <!--item header Condition-->
                </Data>
              </Cell>
              <Cell ss:Index="16" ss:StyleID="s08">
              </Cell>
          </Row>
          <Row>
              <Cell ss:Index="6" ss:StyleID="s11">
                <Data ss:Type="String">
                  <tt:value ref="$header.qty"/>            <!--item header Qty-->
                </Data>
              </Cell>

              <Cell ss:Index="7" ss:StyleID="s13">
              </Cell>

              <Cell ss:Index="8" ss:StyleID="s12">
                <Data ss:Type="String">
                  <tt:value ref="$header.type"/>         <!--item header type-->
                </Data>
              </Cell>

              <Cell ss:Index="9" ss:StyleID="s13">
              </Cell>

              <Cell ss:Index="10" ss:StyleID="s13">
                <Data ss:Type="String">
                  <tt:value ref="$header.des"/>           <!--item header description-->
                </Data>
              </Cell>

              <Cell ss:Index="11" ss:StyleID="s13">
              </Cell>

              <Cell ss:Index="12" ss:StyleID="s13">
              </Cell>



              <Cell ss:Index="13" ss:StyleID="s13">
                <Data ss:Type="String">
                  <tt:value ref="$header.amou"/>           <!--item header amout-->
                </Data>
              </Cell>

              <Cell ss:Index="14" ss:StyleID="s13">
              </Cell>

              <Cell ss:Index="15" ss:StyleID="s11">
                <Data ss:Type="String">
                  <tt:value ref="$header.Unit"/>           <!--item header unit-->
                </Data>
              </Cell>
              <Cell ss:Index="16" ss:StyleID="s08">
              </Cell>
          </Row>
         </tt:loop>

     <!--here is item data-->
     <tt:loop name="item" ref=".it_item_data">
           <Row>

             <tt:switch>
              <tt:cond data="$item.item_type='P'">         <!--when type is 'P'-->
              <Cell ss:Index="2" ss:StyleID="s07">
                <Data ss:Type="String">
                  <tt:value ref="$item.mat_des"/>            <!--material package-->
                </Data>
              </Cell>
              </tt:cond>

              <tt:cond data="$item.item_type='O'">        <!--when type is 'O'-->
              <Cell ss:Index="2" ss:StyleID="s06">
                <Data ss:Type="String">
                  <tt:value ref="$item.mat_des"/>         <!--material offer-->
                </Data>
              </Cell>
              </tt:cond>

              <tt:cond>                                   <!--when type is others-->
              <Cell ss:Index="2" >
                <Data ss:Type="String">
                  <tt:value ref="$item.mat_des"/>          <!--material goods-->
                </Data>
              </Cell>
              </tt:cond>
             </tt:switch>

              <Cell ss:Index="3">
              </Cell>

             <tt:switch>
              <tt:cond data="$item.item_type='P'">       <!--when type is 'P'-->
              <Cell ss:Index="4" ss:StyleID="s07">
                <Data ss:Type="String">
                  <tt:value ref="$item.mat_num"/>          <!--package number-->
                </Data>
              </Cell>
              </tt:cond>

              <tt:cond data="$item.item_type='O'">       <!--when type is 'O'-->
              <Cell ss:Index="4" ss:StyleID="s06">
                <Data ss:Type="String">
                  <tt:value ref="$item.mat_num"/>         <!--offer number-->
                </Data>
              </Cell>
              </tt:cond>

              <tt:cond>                                       <!--when type is other-->
              <Cell ss:Index="4">
                <Data ss:Type="String">
                  <tt:value ref="$item.mat_num"/>                <!--good number-->
                </Data>
              </Cell>
              </tt:cond>
             </tt:switch>

              <Cell ss:Index="5">
              </Cell>

              <Cell ss:Index="6" ss:StyleID="s02">
                <Data ss:Type="String">
                  <tt:value ref="$item.qty"/>                        <!--goods quatity-->
                </Data>
              </Cell>

              <Cell ss:Index="7">
              </Cell>

              <Cell ss:Index="8" ss:StyleID="s05">
                <Data ss:Type="String">
                  <tt:value ref="$item.cond"/>                 <!--goods condition type-->
                </Data>
              </Cell>

              <Cell ss:Index="9">
              </Cell>

             <tt:switch>
              <tt:cond data="$item.item_type='S'">           <!--when type is 'S'-->
              <Cell ss:Index="10" ss:StyleID="s02">
                <Data ss:Type="String">
                  <tt:value ref="$item.con_des"/>          <!--goods condition description-->
                </Data>
              </Cell>
              </tt:cond>

              <tt:cond>
              <Cell ss:Index="10">                            <!--when type is not 'S'-->
                <Data ss:Type="String">
                  <tt:value ref="$item.con_des"/>            <!--subtotal/tax-->
                </Data>
              </Cell>
              </tt:cond>
             </tt:switch>

              <Cell ss:Index="11">
              </Cell>

              <Cell ss:Index="12">
              </Cell>

              <Cell ss:Index="13" ss:StyleID="s02">
                <Data ss:Type="String">
                  <tt:value ref="$item.amou"/>                       <!--goods amout-->
                </Data>
              </Cell>

              <Cell ss:Index="14">
              </Cell>

              <Cell ss:Index="15" ss:StyleID="s02">
                <Data ss:Type="String">
                  <tt:value ref="$item.unit"/>                       <!--goods unit-->
                </Data>
              </Cell>
              <Cell ss:Index="16" ss:StyleID="s08">
              </Cell>
            </Row>
          </tt:loop>

          <Row>
              <Cell ss:Index="16" ss:StyleID="s08">
              </Cell>
          </Row>
          <Row>
              <Cell ss:Index="16" ss:StyleID="s08">
              </Cell>
          </Row>

          <Row>
              <Cell ss:Index="1" ss:StyleID="s09">
              </Cell>
              <Cell ss:Index="2" ss:StyleID="s09">
              </Cell>
              <Cell ss:Index="3" ss:StyleID="s09">
              </Cell>
              <Cell ss:Index="4" ss:StyleID="s09">
              </Cell>
              <Cell ss:Index="5" ss:StyleID="s09">
              </Cell>
              <Cell ss:Index="6" ss:StyleID="s09">
              </Cell>
              <Cell ss:Index="7" ss:StyleID="s09">
              </Cell>
              <Cell ss:Index="8" ss:StyleID="s09">
              </Cell>
              <Cell ss:Index="9" ss:StyleID="s09">
              </Cell>
              <Cell ss:Index="10" ss:StyleID="s09">
              </Cell>
              <Cell ss:Index="11" ss:StyleID="s09">
              </Cell>
              <Cell ss:Index="12" ss:StyleID="s09">
              </Cell>
              <Cell ss:Index="13" ss:StyleID="s09">
              </Cell>
              <Cell ss:Index="14" ss:StyleID="s09">
              </Cell>
              <Cell ss:Index="15" ss:StyleID="s09">
              </Cell>
              <Cell ss:Index="16" ss:StyleID="s10">
              </Cell>
          </Row>
        </Table>

          <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
           <Zoom>81</Zoom>
           <Selected/>
           <DoNotDisplayGridlines/>
              <FreezePanes/>
               <FrozenNoSplit/>
               <SplitHorizontal>9</SplitHorizontal>
               <TopRowBottomPane>9</TopRowBottomPane>
               <ActivePane>2</ActivePane>
               <Panes>
                <Pane>
                 <Number>3</Number>
                </Pane>
                <Pane>
                 <Number>2</Number>
                 <RangeSelection>R6C1:R6C21</RangeSelection>
                </Pane>
               </Panes>
           <ProtectObjects>False</ProtectObjects>
           <ProtectScenarios>False</ProtectScenarios>
          </WorksheetOptions>

      </Worksheet>
    </Workbook>
  </tt:template>
</tt:transform>

最后显示EXCEL显示效果如图所示



这篇关于讲IDOC生成的XML文件转化为excel文件的方法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



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

相关文章

Django HTTPResponse响应体中返回openpyxl生成的文件过程

《DjangoHTTPResponse响应体中返回openpyxl生成的文件过程》Django返回文件流时需通过Content-Disposition头指定编码后的文件名,使用openpyxl的sa... 目录Django返回文件流时使用指定文件名Django HTTPResponse响应体中返回openp

Python安装Pandas库的两种方法

《Python安装Pandas库的两种方法》本文介绍了三种安装PythonPandas库的方法,通过cmd命令行安装并解决版本冲突,手动下载whl文件安装,更换国内镜像源加速下载,最后建议用pipli... 目录方法一:cmd命令行执行pip install pandas方法二:找到pandas下载库,然后

Python进行JSON和Excel文件转换处理指南

《Python进行JSON和Excel文件转换处理指南》在数据交换与系统集成中,JSON与Excel是两种极为常见的数据格式,本文将介绍如何使用Python实现将JSON转换为格式化的Excel文件,... 目录将 jsON 导入为格式化 Excel将 Excel 导出为结构化 JSON处理嵌套 JSON:

Linux系统中查询JDK安装目录的几种常用方法

《Linux系统中查询JDK安装目录的几种常用方法》:本文主要介绍Linux系统中查询JDK安装目录的几种常用方法,方法分别是通过update-alternatives、Java命令、环境变量及目... 目录方法 1:通过update-alternatives查询(推荐)方法 2:检查所有已安装的 JDK方

SQL Server安装时候没有中文选项的解决方法

《SQLServer安装时候没有中文选项的解决方法》用户安装SQLServer时界面全英文,无中文选项,通过修改安装设置中的国家或地区为中文中国,重启安装程序后界面恢复中文,解决了问题,对SQLSe... 你是不是在安装SQL Server时候发现安装界面和别人不同,并且无论如何都没有中文选项?这个问题也

Java Thread中join方法使用举例详解

《JavaThread中join方法使用举例详解》JavaThread中join()方法主要是让调用改方法的thread完成run方法里面的东西后,在执行join()方法后面的代码,这篇文章主要介绍... 目录前言1.join()方法的定义和作用2.join()方法的三个重载版本3.join()方法的工作原

在MySQL中实现冷热数据分离的方法及使用场景底层原理解析

《在MySQL中实现冷热数据分离的方法及使用场景底层原理解析》MySQL冷热数据分离通过分表/分区策略、数据归档和索引优化,将频繁访问的热数据与冷数据分开存储,提升查询效率并降低存储成本,适用于高并发... 目录实现冷热数据分离1. 分表策略2. 使用分区表3. 数据归档与迁移在mysql中实现冷热数据分

Spring Boot从main方法到内嵌Tomcat的全过程(自动化流程)

《SpringBoot从main方法到内嵌Tomcat的全过程(自动化流程)》SpringBoot启动始于main方法,创建SpringApplication实例,初始化上下文,准备环境,刷新容器并... 目录1. 入口:main方法2. SpringApplication初始化2.1 构造阶段3. 运行阶

Olingo分析和实践之ODataImpl详细分析(重要方法详解)

《Olingo分析和实践之ODataImpl详细分析(重要方法详解)》ODataImpl.java是ApacheOlingoOData框架的核心工厂类,负责创建序列化器、反序列化器和处理器等组件,... 目录概述主要职责类结构与继承关系核心功能分析1. 序列化器管理2. 反序列化器管理3. 处理器管理重要方

Python错误AttributeError: 'NoneType' object has no attribute问题的彻底解决方法

《Python错误AttributeError:NoneTypeobjecthasnoattribute问题的彻底解决方法》在Python项目开发和调试过程中,经常会碰到这样一个异常信息... 目录问题背景与概述错误解读:AttributeError: 'NoneType' object has no at