Csharp: Create Excel Workbook or word from a Template File using aspose.Word 14.5 and aspose.Cell 8.1
winform:
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnGenWord_Click(object sender, EventArgs e)
{ Dictionary<string, string> dictSource = new Dictionary<string, string>();
dictSource.Add("NO", "T0001");
dictSource.Add("INDUSTRY", "捷为工作室");
dictSource.Add("NAME", "塗聚文"); string templateFile =("Templates/Templates.doc");
Aspose.Words.Document doc = new Aspose.Words.Document(templateFile); //使用文本方式替换
foreach (string name in dictSource.Keys)
{
doc.Range.Replace(name, dictSource[name], true, true);
} #region 使用书签替换模式 Aspose.Words.Bookmark bookmark = doc.Range.Bookmarks["SEX"];
if (bookmark != null)
{
bookmark.Text = "男";
}
bookmark = doc.Range.Bookmarks["TEL"];
if (bookmark != null)
{
bookmark.Text = "13824350518*";
} #endregion doc.Save("testAdvice"+DateTime.Now.ToString("yyyyMMddHHmmssfff")+".docx",Aspose.Words.SaveFormat.Docx);
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnGenExcel_Click(object sender, EventArgs e)
{
Dictionary<string, string> dictSource = new Dictionary<string, string>();
dictSource.Add("NO", "T0001");
dictSource.Add("INDUSTRY", "捷为工作室");
dictSource.Add("NAME", "塗聚文"); string templateFile = ("Templates/Templates.xls");
WorkbookDesigner designer = new WorkbookDesigner();
//designer.Workbook.FileName=templateFile;
Aspose.Cells.Workbook work = new Workbook(templateFile);
designer.Workbook.Copy(work);
Aspose.Cells.Worksheet worksheet = designer.Workbook.Worksheets[0];
worksheet.Name = "geovindu";
//使用文本替换
foreach (string name in dictSource.Keys)
{
worksheet.Replace(name, dictSource[name]);
} //使用绑定数据方式替换
designer.SetDataSource("SEX", "男");
designer.SetDataSource("TEL", "13824350518*");
designer.Process();
designer.Workbook.Save("testAdvice.xlsx",Aspose.Cells.SaveFormat.Xlsx);
}
webform:
/// <summary>
/// https://github.com/aspose-words/Aspose.Words-for-.NET
/// https://asposewords.codeplex.com/
/// https://asposednn.codeplex.com/
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnGenWord_Click(object sender, EventArgs e)
{
Dictionary<string, string> dictSource = new Dictionary<string, string>();
dictSource.Add("NO", "T0001");
dictSource.Add("INDUSTRY", "捷為工作室");
dictSource.Add("NAME", "涂聚文"); string templateFile = Server.MapPath("./Templates/Templates.doc");
Aspose.Words.Document doc = new Aspose.Words.Document(templateFile); //veb: 14.5 //使用文本方式替换
foreach (string name in dictSource.Keys)
{
doc.Range.Replace(name, dictSource[name], true, true);
} #region 使用书签替换模式 Aspose.Words.Bookmark bookmark = doc.Range.Bookmarks["SEX"];
if (bookmark != null)
{
bookmark.Text = "男";
}
//书签方式
bookmark = doc.Range.Bookmarks["TEL"];
if (bookmark != null)
{
bookmark.Text = "13824350518*";
} #endregion
string savefile = Server.MapPath("./DuFile/geovindu.docx");
doc.Save(savefile, Aspose.Words.SaveFormat.Docx);
Response.Clear();
Response.Buffer = true; //以字符流的形式下载文件
string fileName = "geovindu.docx"; //下載文件名稱
FileStream fs = new FileStream(savefile, FileMode.Open);
byte[] bytes = new byte[(int)fs.Length];
fs.Read(bytes, 0, bytes.Length);
fs.Close();
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.HeaderEncoding = System.Text.Encoding.UTF8;
Response.ContentType = "application/octet-stream";
//通知浏览器下载文件而不是打开
Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
//Response.AddHeader("Content-Length", fs.Length.ToString());
Response.BinaryWrite(bytes);
Response.Flush();
Response.End(); }
/// <summary>
/// http://aspose.github.io/
/// https://github.com/asposemarketplace/Aspose_for_OpenXML
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Button1_Click(object sender, EventArgs e)
{
Dictionary<string, string> dictSource = new Dictionary<string, string>();
dictSource.Add("NO", "T0002");
dictSource.Add("INDUSTRY", "捷為工作室");
dictSource.Add("NAME", "涂聚文"); string templateFile = Server.MapPath("./Templates/Templates.xls");
WorkbookDesigner designer = new WorkbookDesigner(); //Veb:8.1
Aspose.Cells.Workbook work = new Workbook(templateFile);
designer.Workbook.Copy(work);
//designer.Open(templateFile); Aspose.Cells.Worksheet worksheet = designer.Workbook.Worksheets[0];
worksheet.Name = "geovindu";
//使用文本替换
foreach (string name in dictSource.Keys)
{
worksheet.Replace(name, dictSource[name]);
} //使用绑定数据方式替换
designer.SetDataSource("SEX", "男");
designer.SetDataSource("TEL", "13824350518*");
designer.Process();
string savefile = Server.MapPath("./DuFile/geovindu.xlsx");
designer.Workbook.Save(savefile, Aspose.Cells.SaveFormat.Xlsx);
string fileName = "geovindu.xlsx"; //下載文件名稱
FileStream fs = new FileStream(savefile, FileMode.Open);
byte[] bytes = new byte[(int)fs.Length];
fs.Read(bytes, 0, bytes.Length);
fs.Close();
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.HeaderEncoding = System.Text.Encoding.UTF8;
Response.ContentType = "application/octet-stream";
//通知浏览器下载文件而不是打开
Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
//Response.AddHeader("Content-Length", fs.Length.ToString());
Response.BinaryWrite(bytes);
Response.Flush();
Response.End(); }
/// <summary>
/// 提取文檔中的圖片
/// http://doc.evget.com/HelpDocument/AsposeWordsforNETDocumentationCHM/Aspose.Words.Drawing.Shape.html
/// </summary>
public void ExtractImagesToFiles()
{
Document doc = new Document("Image.SampleImages.doc"); NodeCollection shapes = doc.GetChildNodes(NodeType.Shape, true);
int imageIndex = 0;
foreach (Shape shape in shapes)
{
if (shape.HasImage)
{
string imageFileName = string.Format(
"Image.ExportImages.{0} Out{1}", imageIndex, FileFormatUtil.ImageTypeToExtension(shape.ImageData.ImageType));
shape.ImageData.Save(imageFileName);
imageIndex++;
}
} // Newer Microsoft Word documents (such as DOCX) may contain a different type of image container called DrawingML.
// Repeat the process to extract these if they are present in the loaded document.
NodeCollection dmlShapes = doc.GetChildNodes(NodeType.DrawingML, true);
foreach (DrawingML dml in dmlShapes)
{
if (dml.HasImage)
{
string imageFileName = string.Format(
"Image.ExportImages.{0} Out{1}", imageIndex, FileFormatUtil.ImageTypeToExtension(dml.ImageData.ImageType));
dml.ImageData.Save(imageFileName);
imageIndex++;
}
}
}
//同页连续显示
Document dstDoc = new Document("TestFile.Destination.doc");
Document srcDoc = new Document("TestFile.Source.doc"); // Make the document appear straight after the destination documents content.
srcDoc.FirstSection.PageSetup.SectionStart = SectionStart.Continuous; // Append the source document using the original styles found in the source document.
dstDoc.AppendDocument(srcDoc, ImportFormatMode.KeepSourceFormatting);
dstDoc.Save("TestFile.JoinContinuous Out.doc"); //另起一页显示
// Set the appended document to start on a new page.
srcDoc.FirstSection.PageSetup.SectionStart = SectionStart.NewPage;
// Append the source document using the original styles found in the source document.
dstDoc.AppendDocument(srcDoc, ImportFormatMode.KeepSourceFormatting);
dstDoc.Save("TestFile.JoinNewPage Out.doc");
//实例化一个新的Word Document
//也可以在Aspose.Words.Document doc = new Aspose.Words.Document(path)中加path参数, //此path指向你设计好的Word模板路径
Aspose.Words.Document doc = new Aspose.Words.Document();
DocumentBuilder builder = new DocumentBuilder(doc);
//设置单元格内容对齐方式
builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;
//清除设置
builder.PageSetup.ClearFormatting(); DataTable tbl = new DataTable(); List<string> list = new List<string>(); if (tbl != null && tbl.Rows.Count > 0)
{
//加载小组
for (int i = 0; i < tbl.Rows.Count; i++)
{
if (!list.Contains(tbl.Rows[i]["XZ"].ToString()))
{
list.Add(tbl.Rows[i]["XZ"].ToString());
}
}
double imgcellwidth = 85;
double imgcellheight = 120;
double cellwidth = 165;
double cellheight = 18.5;
//匹配小组中的学员
builder.StartTable();//开始画Table
builder.RowFormat.Alignment = Aspose.Words.Tables.RowAlignment.Center;
string xz = string.Empty;
int count = 0;
int rowcount = 0;
for (int n = 0; n < list.Count; n++)
{
xz = list[n];
builder.RowFormat.Height = 20;
//插入Table单元格
builder.InsertCell();
//Table单元格边框线样式
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
//Table此单元格宽度
builder.CellFormat.Width = 500;
//此单元格中内容垂直对齐方式
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
//字体大小
builder.Font.Size = 11;
//是否加粗
builder.Bold = true;
//向此单元格中添加内容
builder.Write(xz);
//Table行结束
builder.EndRow();
builder.Bold = false;
DataRow[] rows = tbl.Select("xz='" + xz + "'");
for (int i = 0; i < rows.Length; i = i + 2)
{
count++;
rowcount = (count - 1) * 6 + 1 + n;
//第一行
builder.InsertCell();
builder.RowFormat.Height = imgcellheight;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
//合并行单元格
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.First;
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;
builder.CellFormat.TopPadding = 2;
builder.CellFormat.WrapText = false;
builder.CellFormat.Width = imgcellwidth;
if (!string.IsNullOrEmpty(rows[i]["ZPPATH"].ToString()))
{
//向此单元格中插入图片
Shape shape = new Shape(doc, ShapeType.Image);
string url = System.Configuration.ConfigurationManager.AppSettings["UserPhotosSitePath"] + "\\" + rows[i]["ZPPATH"].ToString();
shape.ImageData.SetImage(url);
shape.Width = imgcellwidth - 2;
shape.Height = imgcellheight;
shape.HorizontalAlignment = HorizontalAlignment.Center;
CompositeNode node = shape.ParentNode;
//把此图片移动到那个单元格中
builder.MoveToCell(0, rowcount, 0, 0);
builder.InsertNode(shape);
}
builder.InsertCell();
builder.RowFormat.Height = cellheight;
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.Width = cellwidth;
builder.Write(rows[i]["XM"].ToString());
builder.InsertCell();
builder.RowFormat.Height = imgcellheight;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
//合并行单元格
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.First;
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;
builder.CellFormat.Width = imgcellwidth;
if (rows.Length > i + 1)
{
if (!string.IsNullOrEmpty(rows[i + 1]["ZPPATH"].ToString()))
{
Shape shape = new Shape(doc, ShapeType.Image);
string url = System.Configuration.ConfigurationManager.AppSettings["UserPhotosSitePath"] + "\\" + rows[i + 1]["ZPPATH"].ToString();
shape.ImageData.SetImage(url);
shape.Width = imgcellwidth - 2;
shape.Height = imgcellheight;
shape.HorizontalAlignment = HorizontalAlignment.Center;
CompositeNode node = shape.ParentNode;
builder.MoveToCell(0, rowcount, 2, 0);
builder.InsertNode(shape);
}
}
builder.InsertCell();
builder.RowFormat.Height = cellheight;
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.Width = cellwidth;
if (rows.Length > i + 1)
{
builder.Write(rows[i + 1]["XM"].ToString());
}
builder.EndRow();
//第二行
builder.InsertCell();
//此单元格与上一行单元格合并
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.Previous;
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Width = imgcellwidth;
builder.InsertCell();
builder.RowFormat.Height = cellheight;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Width = cellwidth;
builder.Write("单位及职务:" + rows[i]["SZDW"].ToString());
builder.InsertCell();
//此单元格与上一行单元格合并
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.Previous;
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Width = imgcellwidth;
builder.InsertCell();
builder.RowFormat.Height = cellheight;
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.Width = cellwidth;
if (rows.Length > i + 1)
{
builder.Write("单位及职务:" + rows[i + 1]["SZDW"].ToString());
}
builder.EndRow();
//第三行
builder.InsertCell();
//此单元格与上一行单元格合并
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.Previous;
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Width = imgcellwidth;
builder.InsertCell();
builder.RowFormat.Height = cellheight;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Width = cellwidth;
builder.Write("单位电话:" + rows[i]["DWDH"].ToString());
builder.InsertCell();
//此单元格与上一行单元格合并
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.Previous;
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Width = imgcellwidth;
builder.InsertCell();
builder.RowFormat.Height = cellheight;
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.Width = cellwidth;
if (rows.Length > i + 1)
{
builder.Write("单位电话:" + rows[i + 1]["DWDH"].ToString());
}
builder.EndRow();
//第四行
builder.InsertCell();
//此单元格与上一行单元格合并
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.Previous;
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Width = imgcellwidth;
builder.InsertCell();
builder.RowFormat.Height = cellheight;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Width = cellwidth;
builder.Write("手机:" + rows[i]["SJHM"].ToString());
builder.InsertCell();
//此单元格与上一行单元格合并
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.Previous;
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Width = imgcellwidth;
builder.InsertCell();
builder.RowFormat.Height = cellheight;
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.Width = cellwidth;
if (rows.Length > i + 1)
{
builder.Write("手机:" + rows[i + 1]["SJHM"].ToString());
}
builder.EndRow();
//第五行
builder.InsertCell();
//此单元格与上一行单元格合并
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.Previous;
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Width = imgcellwidth;
builder.InsertCell();
builder.RowFormat.Height = cellheight;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Width = cellwidth;
builder.Write("邮编:" + rows[i]["DWYB"].ToString());
builder.InsertCell();
//此单元格与上一行单元格合并
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.Previous;
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Width = imgcellwidth;
builder.InsertCell();
builder.RowFormat.Height = cellheight;
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.Width = cellwidth;
if (rows.Length > i + 1)
{
builder.Write("邮编:" + rows[i + 1]["DWYB"].ToString());
}
builder.EndRow();
//第六行
builder.InsertCell();
//此单元格与上一行单元格合并
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.Previous;
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Width = imgcellwidth;
builder.InsertCell();
builder.RowFormat.Height = cellheight;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Width = cellwidth;
builder.Write("Email:" + rows[i]["DZYJ"].ToString());
builder.InsertCell();
//此单元格与上一行单元格合并
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.Previous;
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Width = imgcellwidth;
builder.InsertCell();
builder.RowFormat.Height = cellheight;
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.Width = cellwidth;
if (rows.Length > i + 1)
{
builder.Write("Email:" + rows[i + 1]["DZYJ"].ToString());
}
builder.EndRow();
}
}
builder.EndTable();
}
string name = "学员通讯录.doc";
//以下载Word的形式打开Wrod
//如图所示:
doc.Save(name, Aspose.Words.SaveFormat.Docx);
https://github.com/asposemarketplace/Aspose_for_OpenXML
Csharp: Create Excel Workbook or word from a Template File using aspose.Word 14.5 and aspose.Cell 8.1的更多相关文章
- 利用Aspose.Word控件和Aspose.Cell控件,实现Word文档和Excel文档的模板化导出
我们知道,一般都导出的Word文档或者Excel文档,基本上分为两类,一类是动态生成全部文档的内容方式,一种是基于固定模板化的内容输出,后者在很多场合用的比较多,这也是企业报表规范化的一个体现. 我的 ...
- [Quote]Creating basic Excel workbook with Open XML
Creating basic Excel workbook with Open XML [Quote from]http://www.codeproject.com/Articles/371203/C ...
- csharp: read excel using Aspose.Cells
/// <summary> /// /// </summary> /// <param name="strFileName"></para ...
- [转]Blue Prism Opening a password protected Excel workbook?
本文转自:https://www.rpaforum.net/threads/opening-a-password-protected-excel-workbook.470/ 问: As the tit ...
- java excel Workbook API
此文摘自:http://blog.sina.com.cn/zenyunhai 1. int getNumberOfSheets() 获得工作薄(Workbook)中工作表(Sheet)的个数,示例: ...
- c#对Aspose.Word替换书签内容的简单封装
辅助类1 json和datatable互转: using System; using System.Collections.Generic; using System.Linq; using S ...
- 利用Aspose.Word控件实现Word文档的操作
Aspose系列的控件,功能都挺好,之前一直在我的Winform开发框架中用Aspose.Cell来做报表输出,可以实现多样化的报表设计及输出,由于一般输出的内容比较正规化或者多数是表格居多,所以一般 ...
- 黄聪:利用Aspose.Word控件实现Word文档的操作(转)
撰写人:伍华聪 http://www.iqidi.com Aspose系列的控件,功能都挺好,之前一直在我的Winform开发框架中用Aspose.Cell来做报表输出,可以实现多样化的报表设计及 ...
- Aspose.Word邮件合并之自定义数据源
Aspose.Word在进行邮件合并时,默认的几个重载方法对Database支持比较友好,但是也可以通过自定义数据源来实现从集合或者对象中返回数据进行邮件合并. 自定义数据源主要是通过实现IMailM ...
随机推荐
- sonne_game网站开发02spring+mybatis框架搭建
从最开始搭框架谈起,而且,我不仅仅会讲how,还会努力讲why.因为对于web开发,由于有太多好的框架.组件.工具,使得how往往不是那么深刻,背后的why更值得专研.如果有初学者关注我这个系列,也一 ...
- ServletConfig接口默认是哪里实现的?
问题:Servlet接口默认是哪里实现的? 答:GenericServlet 1.结构 2.ServletConfig.GenericServlet.HttpServlet的关系如下: public ...
- 第五节:表单标签的用法——value绑定和修饰符
1.表单标签的用法--value绑定和修饰符 value绑定的写法:v-bind:value 或者简写 :value 修饰符: lazy , Number , trim . 用法如: v-model ...
- chrome开发总结(交互/权限/存储)-爬虫
chrome开发总结(交互/权限/存储)-爬虫 [TOC] 标签(空格分隔): 杂乱之地 经过一翻折腾.还是选择了chrome来做爬虫.主要是为了解决一些ajax加载的问题以及代理的问题. 1.chr ...
- SpringAOP之静态代理
一.SpringAOP: ⒈AOP:Aspect Oriented Programming 面向切面编程, 实现的是核心业务和非核心业务之间的的分离,让核心类只做核心业务,代理类只做非核心业务. ⒉ ...
- Android入门(十三)内容提供器
原文链接:http://www.orlion.ga/612/ 内容提供器(Content Provider)主要用于在不同的应用程序之间实现数据共享的功能,它提供了一套完整的机制,允许一个程序访问另一 ...
- JSP网站开发基础总结《十》
经过上一篇的介绍相信大家对JSP提供的过滤器一定有了一个概念,本篇我们就一起再来研究一下关于创建多个过滤器时,如果有两个以上过滤器的过滤规则相同,那么这些过滤器的执行顺序如何呢?答案是根据我们在web ...
- [转载]UML类图总结
前言 类图和序列图是UML中最常用的两种Diagram.我将做详细的总结.在许多书中,或者网站中,在介绍一个系统的子系统的设计时,很多时候,都是给出简单的类图来简述构成子系统的类之间的关系.这足以说明 ...
- Spark入门实战系列--6.SparkSQL(下)--Spark实战应用
[注]该系列文章以及使用到安装包/测试数据 可以在<倾情大奉送--Spark入门实战系列>获取 .运行环境说明 1.1 硬软件环境 线程,主频2.2G,10G内存 l 虚拟软件:VMwa ...
- 利用Solr服务建立的站内搜索雏形---solr1
最近看完nutch后总感觉像好好捯饬下solr,上次看到老大给我展现了下站内搜索我便久久不能忘怀.总觉着之前搭建的nutch配上solr还是有点呆板,在nutch爬取的时候就建立索引到solr服务下, ...