Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
9ac42835
Commit
9ac42835
authored
Nov 02, 2022
by
高东东
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加文件转换
parent
7fc55c6a
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
2721 additions
and
1 deletion
+2721
-1
pom.xml
...le/amos-boot-module-api/amos-boot-module-file-api/pom.xml
+103
-0
Constants.java
...src/main/java/com/yeejoin/amos/file/config/Constants.java
+34
-0
MatchLicense.java
.../main/java/com/yeejoin/amos/file/config/MatchLicense.java
+38
-0
DocConvert.java
...c/main/java/com/yeejoin/amos/file/convert/DocConvert.java
+119
-0
EMFConvert.java
...c/main/java/com/yeejoin/amos/file/convert/EMFConvert.java
+34
-0
HTMLConvert.java
.../main/java/com/yeejoin/amos/file/convert/HTMLConvert.java
+426
-0
PDFConvert.java
...c/main/java/com/yeejoin/amos/file/convert/PDFConvert.java
+315
-0
PPTConvert.java
...c/main/java/com/yeejoin/amos/file/convert/PPTConvert.java
+30
-0
SVGConvert.java
...c/main/java/com/yeejoin/amos/file/convert/SVGConvert.java
+29
-0
AllPageInfo.java
.../src/main/java/com/yeejoin/amos/file/dto/AllPageInfo.java
+47
-0
CatalogInfo.java
.../src/main/java/com/yeejoin/amos/file/dto/CatalogInfo.java
+70
-0
ChildCatalog.java
...src/main/java/com/yeejoin/amos/file/dto/ChildCatalog.java
+78
-0
PageInfo.java
...api/src/main/java/com/yeejoin/amos/file/dto/PageInfo.java
+95
-0
SpiltService.java
...main/java/com/yeejoin/amos/file/service/SpiltService.java
+349
-0
license.xml
...i/src/main/java/com/yeejoin/amos/file/service/license.xml
+15
-0
HelpUtil.java
...i/src/main/java/com/yeejoin/amos/file/utils/HelpUtil.java
+45
-0
MyFileUtil.java
...src/main/java/com/yeejoin/amos/file/utils/MyFileUtil.java
+178
-0
WkHtmlUtil.java
...src/main/java/com/yeejoin/amos/file/utils/WkHtmlUtil.java
+152
-0
license.xml
.../amos-boot-module-file-api/src/main/resources/license.xml
+13
-0
pom.xml
amos-boot-module/amos-boot-module-api/pom.xml
+2
-0
.factorypath
...os-boot-module-biz/amos-boot-module-file-biz/.factorypath
+276
-0
pom.xml
...le/amos-boot-module-biz/amos-boot-module-file-biz/pom.xml
+23
-0
pom.xml
amos-boot-module/amos-boot-module-biz/pom.xml
+2
-0
pom.xml
amos-boot-system-file/pom.xml
+34
-0
AmoFileApplication.java
...le/src/main/java/com/yeejoin/amos/AmoFileApplication.java
+54
-0
application-dev.properties
...system-file/src/main/resources/application-dev.properties
+51
-0
application.properties
...oot-system-file/src/main/resources/application.properties
+52
-0
changelog-master.xml
...file/src/main/resources/db/changelog/changelog-master.xml
+9
-0
logback-dev.xml
amos-boot-system-file/src/main/resources/logback-dev.xml
+45
-0
pom.xml
pom.xml
+3
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-file-api/pom.xml
0 → 100644
View file @
9ac42835
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-boot-module-api
</artifactId>
<version>
1.0.0
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
amos-boot-module-file-api
</artifactId>
<dependencies>
<!--pdf转图片-->
<dependency>
<groupId>
org.apache.pdfbox
</groupId>
<artifactId>
pdfbox
</artifactId>
<version>
2.0.15
</version>
</dependency>
<dependency>
<groupId>
org.apache.pdfbox
</groupId>
<artifactId>
fontbox
</artifactId>
<version>
2.0.15
</version>
</dependency>
<!--Cannot read JPEG2000 image: Java Advanced Imaging (JAI) Image I/O Tools are not installed-->
<dependency>
<groupId>
com.github.jai-imageio
</groupId>
<artifactId>
jai-imageio-jpeg2000
</artifactId>
<version>
1.3.0
</version>
</dependency>
<!--PDF解析依赖-->
<dependency>
<groupId>
com.itextpdf
</groupId>
<artifactId>
itextpdf
</artifactId>
<version>
5.5.13
</version>
</dependency>
<dependency>
<groupId>
com.itextpdf
</groupId>
<artifactId>
itext-asian
</artifactId>
<version>
5.2.0
</version>
</dependency>
<dependency>
<groupId>
net.sf.cssbox
</groupId>
<artifactId>
pdf2dom
</artifactId>
<version>
1.7
</version>
</dependency>
<dependency>
<groupId>
org.apache.pdfbox
</groupId>
<artifactId>
pdfbox
</artifactId>
<version>
2.0.12
</version>
</dependency>
<dependency>
<groupId>
org.apache.pdfbox
</groupId>
<artifactId>
pdfbox-tools
</artifactId>
<version>
2.0.12
</version>
</dependency>
<dependency>
<groupId>
com.aspose
</groupId>
<artifactId>
aspose-pdf
</artifactId>
<version>
18.9
</version>
</dependency>
<dependency>
<groupId>
com.aspose
</groupId>
<artifactId>
aspose-words
</artifactId>
<version>
19.5jdk
</version>
</dependency>
<dependency>
<groupId>
com.aspose
</groupId>
<artifactId>
aspose-cells
</artifactId>
<version>
8.5.2
</version>
</dependency>
<dependency>
<groupId>
e-iceblue
</groupId>
<artifactId>
spire.doc.free
</artifactId>
<version>
2.7.3
</version>
</dependency>
<dependency>
<groupId>
e-iceblue
</groupId>
<artifactId>
spire.pdf.free
</artifactId>
<version>
2.6.3
</version>
</dependency>
<dependency>
<groupId>
cn.hutool
</groupId>
<artifactId>
hutool-all
</artifactId>
<version>
5.3.8
</version>
</dependency>
<!-- thumbnailator: 图片压缩工具 -->
<dependency>
<groupId>
net.coobird
</groupId>
<artifactId>
thumbnailator
</artifactId>
<version>
0.4.8
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
amos-boot-module/amos-boot-module-api/amos-boot-module-file-api/src/main/java/com/yeejoin/amos/file/config/Constants.java
0 → 100644
View file @
9ac42835
package
com
.
yeejoin
.
amos
.
file
.
config
;
/**
* <p>
* 全局常用变量
* </p>
*
* @author zhengqing
* @description
* @date 2019/10/12 14:47
*/
public
class
Constants
{
// ===============================================================================
// ============================ ↓↓↓↓↓↓ 文件系列 ↓↓↓↓↓↓ ============================
// ===============================================================================
/**
* 系统分隔符
*/
public
static
String
SYSTEM_SEPARATOR
=
"/"
;
/**
* 获取项目根目录
*/
public
static
String
PROJECT_ROOT_DIRECTORY
=
System
.
getProperty
(
"user.dir"
).
replaceAll
(
"\\\\"
,
SYSTEM_SEPARATOR
);
/**
* 临时文件相关
*/
public
final
static
String
DEFAULT_FOLDER_TMP
=
PROJECT_ROOT_DIRECTORY
+
"/tmp"
;
public
final
static
String
DEFAULT_FOLDER_TMP_GENERATE
=
PROJECT_ROOT_DIRECTORY
+
"/tmp-generate"
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-file-api/src/main/java/com/yeejoin/amos/file/config/MatchLicense.java
0 → 100644
View file @
9ac42835
package
com
.
yeejoin
.
amos
.
file
.
config
;
import
com.aspose.words.License
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.core.io.ClassPathResource
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.InputStream
;
/**
* <p>
* `aspose-words`授权处理
* </p>
*
* @author zhengqing
* @description
* @date 2020/12/30$ 11:33$
*/
@Slf4j
public
class
MatchLicense
{
public
static
void
init
()
{
try
{
log
.
info
(
"实现`aspose-words`授权 -> 去掉头部水印"
);
/*
实现匹配文件授权 -> 去掉头部水印 `Evaluation Only. Created with Aspose.Words. Copyright 2003-2018 Aspose Pty Ltd.` |
`Evaluation Only. Created with Aspose.Cells for Java. Copyright 2003 - 2020 Aspose Pty Ltd.`
*/
InputStream
is
=
new
ClassPathResource
(
"license.xml"
).
getInputStream
();
License
license
=
new
License
();
license
.
setLicense
(
is
);
}
catch
(
Exception
e
)
{
log
.
error
(
"《`aspose-words`授权》 失败: {}"
,
e
.
getMessage
());
}
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-file-api/src/main/java/com/yeejoin/amos/file/convert/DocConvert.java
0 → 100644
View file @
9ac42835
package
com
.
yeejoin
.
amos
.
file
.
convert
;
import
java.io.ByteArrayInputStream
;
import
java.io.ByteArrayOutputStream
;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.io.OutputStream
;
import
org.apache.poi.poifs.filesystem.DirectoryEntry
;
import
org.apache.poi.poifs.filesystem.DocumentEntry
;
import
org.apache.poi.poifs.filesystem.POIFSFileSystem
;
import
com.aspose.pdf.Document
;
import
com.aspose.pdf.SvgSaveOptions
;
import
com.aspose.words.DocSaveOptions
;
import
com.aspose.words.SaveFormat
;
import
com.spire.pdf.FileFormat
;
import
com.spire.pdf.PdfDocument
;
import
com.spire.pdf.widget.PdfPageCollection
;
import
lombok.SneakyThrows
;
import
lombok.extern.slf4j.Slf4j
;
@Slf4j
public
class
DocConvert
{
/**
* pdf转为docx
* @param pdfpath pdf路径
* @param docxpath dox路径
*/
public
static
void
pdf2docx
(
String
pdfpath
,
String
docxpath
)
{
// load PDF document
Document
doc
=
new
Document
(
pdfpath
);
DocSaveOptions
saveOptions
=
new
DocSaveOptions
();
// resultant file name
String
outFileName
=
docxpath
;
doc
.
save
(
docxpath
);
}
/**
* pdf转为docx
* @param pdfpath pdf路径
* @param OutputStream out流
*/
public
static
void
pdf2docx
(
String
pdfpath
,
OutputStream
out
)
{
// load PDF document
Document
doc
=
new
Document
(
pdfpath
);
// instantiate an object of SvgSaveOptions
SvgSaveOptions
saveOptions
=
new
SvgSaveOptions
();
// do not compress SVG image to Zip archive
saveOptions
.
CompressOutputToZipArchive
=
false
;
// save the output in SVG files
doc
.
save
(
out
,
saveOptions
);
}
/**
* `html` 转 `word` 【 注:本地图片不支持显示!!! 需转换成在线图片 】
*
* @param htmlBytes: html字节码
* @return word文件路径
* @author zhengqing
* @date 2020/11/24 11:52
*/
@SneakyThrows
(
Exception
.
class
)
public
static
byte
[]
htmlBytes2WordBytes
(
byte
[]
htmlBytes
)
{
com
.
aspose
.
words
.
Document
doc
=
new
com
.
aspose
.
words
.
Document
();
com
.
aspose
.
words
.
DocumentBuilder
builder
=
new
com
.
aspose
.
words
.
DocumentBuilder
(
doc
);
builder
.
insertHtml
(
new
String
(
htmlBytes
));
ByteArrayOutputStream
outputStream
=
new
ByteArrayOutputStream
();
doc
.
save
(
outputStream
,
SaveFormat
.
DOCX
);
return
outputStream
.
toByteArray
();
}
/**
* `html` 转 `word` 【 注:本地图片不支持显示!!! 需转换成在线图片 】
*
* @param htmlBytes: html字节码
* @param wordFilePath: 待生成的word文件路径
* @return word文件数据
*/
@SneakyThrows
(
Exception
.
class
)
public
static
File
htmlBytes2WordFile
(
byte
[]
htmlBytes
,
String
wordFilePath
)
{
com
.
aspose
.
words
.
Document
doc
=
new
com
.
aspose
.
words
.
Document
();
com
.
aspose
.
words
.
DocumentBuilder
builder
=
new
com
.
aspose
.
words
.
DocumentBuilder
(
doc
);
builder
.
insertHtml
(
new
String
(
htmlBytes
));
doc
.
save
(
wordFilePath
,
SaveFormat
.
DOCX
);
return
new
File
(
wordFilePath
);
}
/**
* `html` 转 `word` 【注`doc`生成的html中的图片路径中中文是被转义处理过的,再生成word时图片便看不了,需单独做处理,`docx`无此问题】 【 注:此方式会丢失一定格式 】
*
* @param html: html内容
* @param fileRootPath: 文件根位置
* @param wordFileName: 待生成的word文件名
* @return word文件路径
*/
@SneakyThrows
(
Exception
.
class
)
public
static
String
html2Word
(
String
html
,
String
fileRootPath
,
String
wordFileName
)
{
final
String
wordFilePath
=
fileRootPath
+
"/"
+
wordFileName
;
byte
htmlBytes
[]
=
html
.
getBytes
();
ByteArrayInputStream
inputStream
=
new
ByteArrayInputStream
(
htmlBytes
);
POIFSFileSystem
poifs
=
new
POIFSFileSystem
();
DirectoryEntry
directory
=
poifs
.
getRoot
();
DocumentEntry
documentEntry
=
directory
.
createDocument
(
"WordDocument"
,
inputStream
);
FileOutputStream
outputStream
=
new
FileOutputStream
(
wordFilePath
);
poifs
.
writeFilesystem
(
outputStream
);
inputStream
.
close
();
outputStream
.
close
();
return
wordFilePath
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-file-api/src/main/java/com/yeejoin/amos/file/convert/EMFConvert.java
0 → 100644
View file @
9ac42835
package
com
.
yeejoin
.
amos
.
file
.
convert
;
import
java.io.OutputStream
;
import
com.aspose.pdf.*
;
import
com.aspose.pdf.devices.EmfDevice
;
import
com.aspose.pdf.devices.Resolution
;
public
class
EMFConvert
{
/**
* pdf转为emf文件,只能转换一页
*/
public
static
void
pdf2emf
(
String
inputPath
,
String
outPath
){
// instantiate EmfDevice object
EmfDevice
device
=
new
EmfDevice
(
new
Resolution
(
96
));
// load existing PDF file
Document
doc
=
new
Document
(
inputPath
);
// save first page of PDF file as Emf image
device
.
process
(
doc
.
getPages
().
get_Item
(
1
),
outPath
);
}
/**
* pdf转为emf文件,只能转换一页
*/
public
static
void
pdf2emf
(
String
inputPath
,
OutputStream
out
){
// instantiate EmfDevice object
EmfDevice
device
=
new
EmfDevice
(
new
Resolution
(
96
));
// load existing PDF file
Document
doc
=
new
Document
(
inputPath
);
// save first page of PDF file as Emf image
device
.
process
(
doc
.
getPages
().
get_Item
(
1
),
out
);
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-file-api/src/main/java/com/yeejoin/amos/file/convert/HTMLConvert.java
0 → 100644
View file @
9ac42835
package
com
.
yeejoin
.
amos
.
file
.
convert
;
import
java.io.ByteArrayInputStream
;
import
java.io.ByteArrayOutputStream
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileOutputStream
;
import
java.io.InputStream
;
import
java.io.OutputStream
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.UUID
;
import
javax.xml.parsers.DocumentBuilderFactory
;
import
javax.xml.transform.OutputKeys
;
import
javax.xml.transform.Transformer
;
import
javax.xml.transform.TransformerFactory
;
import
javax.xml.transform.dom.DOMSource
;
import
javax.xml.transform.stream.StreamResult
;
import
org.apache.poi.hwpf.HWPFDocument
;
import
org.apache.poi.hwpf.converter.PicturesManager
;
import
org.apache.poi.hwpf.converter.WordToHtmlConverter
;
import
org.apache.poi.hwpf.usermodel.Picture
;
import
org.apache.poi.hwpf.usermodel.PictureType
;
import
org.apache.poi.xwpf.converter.core.FileImageExtractor
;
import
org.apache.poi.xwpf.converter.core.IURIResolver
;
import
org.apache.poi.xwpf.converter.xhtml.XHTMLConverter
;
import
org.apache.poi.xwpf.converter.xhtml.XHTMLOptions
;
import
org.apache.poi.xwpf.usermodel.XWPFDocument
;
import
org.springframework.util.CollectionUtils
;
import
com.aspose.pdf.Document
;
import
com.aspose.pdf.Font
;
import
com.aspose.pdf.FontRepository
;
import
com.aspose.pdf.HtmlSaveOptions
;
import
com.aspose.pdf.text.CustomFontSubstitutionBase
;
import
com.aspose.words.SaveFormat
;
import
com.yeejoin.amos.file.config.Constants
;
import
com.yeejoin.amos.file.utils.MyFileUtil
;
import
lombok.SneakyThrows
;
import
lombok.extern.slf4j.Slf4j
;
@Slf4j
public
class
HTMLConvert
{
/**
* pdf转为html 方式一
* @param pdfpath pdf路径
* @param docxpath html路径
*/
public
static
void
pdf2html
(
String
pdfpath
,
String
htmlpath
)
{
// Load existing PDf file
Document
pdfDoc
=
new
Document
(
pdfpath
);
final
Map
names
=
new
HashMap
();
// pdfDoc.FontSubstitution.add(new Document.FontSubstitutionHandler() {
// public void invoke(Font font, Font newFont) {
// // add substituted FontNames into map.
// names.put(font.getFontName(), newFont.getFontName());
// // or print the message into console
// System.out.println("Warning: Font " + font.getFontName() + " was substituted with another font -> " + newFont.getFontName());
// }
// });
// instantiate HTMLSave option to save output in HTML
HtmlSaveOptions
htmlSaveOps
=
new
HtmlSaveOptions
();
// save resultant file
pdfDoc
.
save
(
htmlpath
,
htmlSaveOps
);
}
/**
* pdf转为html 方式一
* @param pdfpath pdf路径
* @param OutputStream out流
*/
public
static
void
pdf2html
(
String
pdfpath
,
OutputStream
out
)
{
// Load existing PDf file
Document
pdfDoc
=
new
Document
(
pdfpath
);
final
Map
names
=
new
HashMap
();
/*pdfDoc.FontSubstitution.add(new Document.FontSubstitutionHandler() {
public void invoke(Font font, Font newFont) {
// add substituted FontNames into map.
names.put(font.getFontName(), newFont.getFontName());
// or print the message into console
System.out.println("Warning: Font " + font.getFontName() + " was substituted with another font -> " + newFont.getFontName());
}
});*/
// instantiate HTMLSave option to save output in HTML
HtmlSaveOptions
htmlSaveOps
=
new
HtmlSaveOptions
();
// save resultant file
pdfDoc
.
save
(
out
,
htmlSaveOps
);
}
/**
* pdf转为html 方式二
* @param pdfpath pdf路径
* @param docxpath html路径
*/
public
static
void
pdf2html2
(
String
pdfpath
,
String
htmlpath
)
throws
Exception
{
Document
pdf
=
new
Document
(
pdfpath
);
// configure font substitution
CustomSubst1
subst1
=
new
CustomSubst1
();
FontRepository
.
getSubstitutions
().
add
(
subst1
);
// Configure notifier to console
pdf
.
FontSubstitution
.
add
(
new
Document
.
FontSubstitutionHandler
()
{
public
void
invoke
(
Font
font
,
Font
newFont
)
{
// print substituted FontNames into console
System
.
out
.
println
(
"Warning: Font "
+
font
.
getFontName
()
+
" was substituted with another font -> "
+
newFont
.
getFontName
());
}
});
HtmlSaveOptions
htmlSaveOps
=
new
HtmlSaveOptions
();
pdf
.
save
(
htmlpath
,
htmlSaveOps
);
}
/**
* pdf转为html 方式二
* @param pdfpath pdf路径
* @param docxpath html路径
*/
public
static
void
pdf2html2
(
String
pdfpath
,
OutputStream
out
)
throws
Exception
{
Document
pdf
=
new
Document
(
pdfpath
);
// configure font substitution
CustomSubst1
subst1
=
new
CustomSubst1
();
FontRepository
.
getSubstitutions
().
add
(
subst1
);
// Configure notifier to console
pdf
.
FontSubstitution
.
add
(
new
Document
.
FontSubstitutionHandler
()
{
public
void
invoke
(
Font
font
,
Font
newFont
)
{
// print substituted FontNames into console
System
.
out
.
println
(
"Warning: Font "
+
font
.
getFontName
()
+
" was substituted with another font -> "
+
newFont
.
getFontName
());
}
});
HtmlSaveOptions
htmlSaveOps
=
new
HtmlSaveOptions
();
pdf
.
save
(
out
,
htmlSaveOps
);
}
private
static
class
CustomSubst1
extends
CustomFontSubstitutionBase
{
public
boolean
trySubstitute
(
OriginalFontSpecification
originalFontSpecification
,
/* out */
com
.
aspose
.
pdf
.
Font
[]
substitutionFont
)
{
substitutionFont
[
0
]
=
FontRepository
.
findFont
(
"MSGothic"
);
return
true
;
}
}
/**
* `word` 转 `html`
*
* @param wordBytes: word字节码
* @return html文件字节码数据
*/
@SneakyThrows
(
Exception
.
class
)
public
static
byte
[]
wordBytes2HtmlBytes
(
byte
[]
wordBytes
)
{
// 创建临时word转html后生成的html文件
String
tmpHtmlFilePath
=
Constants
.
DEFAULT_FOLDER_TMP_GENERATE
+
"/"
+
System
.
currentTimeMillis
()
+
"-"
+
getUUID32
()
+
".html"
;
com
.
aspose
.
words
.
Document
doc
=
new
com
.
aspose
.
words
.
Document
(
new
ByteArrayInputStream
(
wordBytes
));
doc
.
save
(
tmpHtmlFilePath
,
SaveFormat
.
HTML
);
byte
[]
htmlBytes
=
MyFileUtil
.
readBytes
(
tmpHtmlFilePath
);
// 删除临时word文件
MyFileUtil
.
deleteFileOrFolder
(
tmpHtmlFilePath
);
return
htmlBytes
;
}
/**
* `word` 转 `html`
*
* @param wordBytes: word字节码
* @param htmlFilePath: html文件路径
* @return html文件数据
*/
@SneakyThrows
(
Exception
.
class
)
public
static
File
wordBytes2HtmlFile
(
byte
[]
wordBytes
,
String
htmlFilePath
)
{
// Load word document from disk.
com
.
aspose
.
words
.
Document
doc
=
new
com
.
aspose
.
words
.
Document
(
new
ByteArrayInputStream
(
wordBytes
));
// Save the document into MHTML.
doc
.
save
(
htmlFilePath
,
SaveFormat
.
HTML
);
return
new
File
(
htmlFilePath
);
}
/**
* 获取32位的uuid
*
* @return java.lang.String
*/
private
static
String
getUUID32
()
{
return
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
).
toLowerCase
();
}
// ================================= ↓↓↓↓↓↓ 【 注:下面方式会丢失一定格式 】 ↓↓↓↓↓↓ ==================================
/**
* word2003-2007转换成html 【 支持 .doc and .docx 】
*
* @param fileRootPath: 文件根位置
* @param wordFileName: 需转换的word文件名
* @param imagePath: 图片存放路径
* @return 返回html内容
*/
@SneakyThrows
(
Exception
.
class
)
public
static
String
word2Html
(
String
fileRootPath
,
String
wordFileName
,
String
imagePath
)
{
// word 文件路径
final
String
wordFilePath
=
fileRootPath
+
"/"
+
wordFileName
;
// 文件后缀名
final
String
wordFileNameSuffix
=
wordFileName
.
substring
(
wordFileName
.
lastIndexOf
(
"."
)
+
1
);
log
.
debug
(
"《word转html》 word文件路径:【{}】"
,
wordFilePath
);
// 判断是否为`docx`文件
boolean
ifDocxSuffix
=
false
;
if
(
"docx"
.
equals
(
wordFileNameSuffix
))
{
ifDocxSuffix
=
true
;
}
ByteArrayOutputStream
out
=
new
ByteArrayOutputStream
();
/**
* word2007和word2003的构建方式不同, 前者的构建方式是xml,后者的构建方式是dom树。 文件的后缀也不同,前者后缀为.docx,后者后缀为.doc 相应的,apache.poi提供了不同的实现类。
*/
if
(
ifDocxSuffix
)
{
// step 1 : load DOCX into XWPFDocument
InputStream
inputStream
=
new
FileInputStream
(
new
File
(
wordFilePath
));
XWPFDocument
document
=
new
XWPFDocument
(
inputStream
);
// step 2 : prepare XHTML options
XHTMLOptions
options
=
XHTMLOptions
.
create
();
// 存放图片的文件夹
options
.
setExtractor
(
new
FileImageExtractor
(
new
File
(
imagePath
)));
options
.
setIgnoreStylesIfUnused
(
false
);
options
.
setFragment
(
true
);
// html中图片的路径
options
.
URIResolver
(
new
IURIResolver
()
{
// step 3 : convert XWPFDocument to XHTML
public
String
resolve
(
String
uri
)
{
return
imagePath
+
"/"
+
uri
;
}
});
XHTMLConverter
.
getInstance
().
convert
(
document
,
out
,
options
);
}
else
{
// WordToHtmlUtils.loadDoc(new FileInputStream(inputFile));
HWPFDocument
wordDocument
=
new
HWPFDocument
(
new
FileInputStream
(
wordFilePath
));
WordToHtmlConverter
wordToHtmlConverter
=
new
WordToHtmlConverter
(
DocumentBuilderFactory
.
newInstance
().
newDocumentBuilder
().
newDocument
());
// 设置图片存储位置,并保存
wordToHtmlConverter
.
setPicturesManager
(
new
PicturesManager
()
{
@SneakyThrows
(
Exception
.
class
)
public
String
savePicture
(
byte
[]
content
,
PictureType
pictureType
,
String
suggestedName
,
float
widthInches
,
float
heightInches
)
{
// 首先要判断图片是否能识别
if
(
pictureType
.
equals
(
PictureType
.
UNKNOWN
))
{
return
""
;
}
String
htmlImgPath
=
imagePath
+
"/"
+
suggestedName
;
FileOutputStream
os
=
new
FileOutputStream
(
MyFileUtil
.
touch
(
htmlImgPath
));
os
.
write
(
content
);
os
.
close
();
log
.
debug
(
"图片地址:【{}】"
,
htmlImgPath
);
// 可将文件上传到第三方存储文件服务器,然后返回相应图片地址
return
htmlImgPath
;
}
});
// 解析word文档
wordToHtmlConverter
.
processDocument
(
wordDocument
);
// save pictures
List
<
Picture
>
picList
=
wordDocument
.
getPicturesTable
().
getAllPictures
();
if
(!
CollectionUtils
.
isEmpty
(
picList
))
{
picList
.
forEach
(
pic
->
{
// FileOutputStream outputStream = new FileOutputStream(imagePath + "/" +
// pic.suggestFullFileName());
// pic.writeImageContent(outputStream);
});
}
org
.
w3c
.
dom
.
Document
htmlDocument
=
wordToHtmlConverter
.
getDocument
();
DOMSource
domSource
=
new
DOMSource
(
htmlDocument
);
StreamResult
streamResult
=
new
StreamResult
(
out
);
// 这个应该是转换成xml的
TransformerFactory
tf
=
TransformerFactory
.
newInstance
();
Transformer
serializer
=
tf
.
newTransformer
();
serializer
.
setOutputProperty
(
OutputKeys
.
ENCODING
,
"utf-8"
);
serializer
.
setOutputProperty
(
OutputKeys
.
INDENT
,
"yes"
);
serializer
.
setOutputProperty
(
OutputKeys
.
METHOD
,
"html"
);
serializer
.
transform
(
domSource
,
streamResult
);
}
// 关闭流
out
.
close
();
// 返回html文件内容
return
new
String
(
out
.
toByteArray
());
}
@SneakyThrows
(
Exception
.
class
)
public
static
void
word2Html
(
String
fileRootPath
,
String
wordFileName
,
String
imagePath
,
OutputStream
htmlOut
)
{
// word 文件路径
final
String
wordFilePath
=
fileRootPath
+
"/"
+
wordFileName
;
// 文件后缀名
final
String
wordFileNameSuffix
=
wordFileName
.
substring
(
wordFileName
.
lastIndexOf
(
"."
)
+
1
);
log
.
debug
(
"《word转html》 word文件路径:【{}】"
,
wordFilePath
);
// 判断是否为`docx`文件
boolean
ifDocxSuffix
=
false
;
if
(
"docx"
.
equals
(
wordFileNameSuffix
))
{
ifDocxSuffix
=
true
;
}
ByteArrayOutputStream
out
=
new
ByteArrayOutputStream
();
/**
* word2007和word2003的构建方式不同, 前者的构建方式是xml,后者的构建方式是dom树。 文件的后缀也不同,前者后缀为.docx,后者后缀为.doc 相应的,apache.poi提供了不同的实现类。
*/
if
(
ifDocxSuffix
)
{
// step 1 : load DOCX into XWPFDocument
InputStream
inputStream
=
new
FileInputStream
(
new
File
(
wordFilePath
));
XWPFDocument
document
=
new
XWPFDocument
(
inputStream
);
// step 2 : prepare XHTML options
XHTMLOptions
options
=
XHTMLOptions
.
create
();
// 存放图片的文件夹
options
.
setExtractor
(
new
FileImageExtractor
(
new
File
(
imagePath
)));
options
.
setIgnoreStylesIfUnused
(
false
);
options
.
setFragment
(
true
);
// html中图片的路径
options
.
URIResolver
(
new
IURIResolver
()
{
// step 3 : convert XWPFDocument to XHTML
public
String
resolve
(
String
uri
)
{
return
imagePath
+
"/"
+
uri
;
}
});
XHTMLConverter
.
getInstance
().
convert
(
document
,
out
,
options
);
}
else
{
// WordToHtmlUtils.loadDoc(new FileInputStream(inputFile));
HWPFDocument
wordDocument
=
new
HWPFDocument
(
new
FileInputStream
(
wordFilePath
));
WordToHtmlConverter
wordToHtmlConverter
=
new
WordToHtmlConverter
(
DocumentBuilderFactory
.
newInstance
().
newDocumentBuilder
().
newDocument
());
// 设置图片存储位置,并保存
wordToHtmlConverter
.
setPicturesManager
(
new
PicturesManager
()
{
@SneakyThrows
(
Exception
.
class
)
public
String
savePicture
(
byte
[]
content
,
PictureType
pictureType
,
String
suggestedName
,
float
widthInches
,
float
heightInches
)
{
// 首先要判断图片是否能识别
if
(
pictureType
.
equals
(
PictureType
.
UNKNOWN
))
{
return
""
;
}
String
htmlImgPath
=
imagePath
+
"/"
+
suggestedName
;
FileOutputStream
os
=
new
FileOutputStream
(
MyFileUtil
.
touch
(
htmlImgPath
));
os
.
write
(
content
);
os
.
close
();
log
.
debug
(
"图片地址:【{}】"
,
htmlImgPath
);
// 可将文件上传到第三方存储文件服务器,然后返回相应图片地址
return
htmlImgPath
;
}
});
// 解析word文档
wordToHtmlConverter
.
processDocument
(
wordDocument
);
// save pictures
List
<
Picture
>
picList
=
wordDocument
.
getPicturesTable
().
getAllPictures
();
if
(!
CollectionUtils
.
isEmpty
(
picList
))
{
picList
.
forEach
(
pic
->
{
// FileOutputStream outputStream = new FileOutputStream(imagePath + "/" +
// pic.suggestFullFileName());
// pic.writeImageContent(outputStream);
});
}
org
.
w3c
.
dom
.
Document
htmlDocument
=
wordToHtmlConverter
.
getDocument
();
DOMSource
domSource
=
new
DOMSource
(
htmlDocument
);
StreamResult
streamResult
=
new
StreamResult
(
out
);
// 这个应该是转换成xml的
TransformerFactory
tf
=
TransformerFactory
.
newInstance
();
Transformer
serializer
=
tf
.
newTransformer
();
serializer
.
setOutputProperty
(
OutputKeys
.
ENCODING
,
"utf-8"
);
serializer
.
setOutputProperty
(
OutputKeys
.
INDENT
,
"yes"
);
serializer
.
setOutputProperty
(
OutputKeys
.
METHOD
,
"html"
);
serializer
.
transform
(
domSource
,
streamResult
);
}
// 关闭流
out
.
close
();
// 返回html文件内容
htmlOut
.
write
(
out
.
toByteArray
());
}
/**
* `word` 转 `html`
*
* @param fileRootPath: 文件根位置
* @param wordFileName: 需转换的word文件名
* @param htmlFileName: 最后生成后的html文件名
* @return 生成的html文件信息
*/
public
static
File
word2HtmlFile
(
String
fileRootPath
,
String
wordFileName
,
String
htmlFileName
)
{
final
String
htmlFilePath
=
fileRootPath
+
"/"
+
htmlFileName
;
// 获取word转html文件内容
String
htmlContent
=
word2HtmlContent
(
fileRootPath
,
wordFileName
,
htmlFileName
);
// 生成html文件
File
htmlFile
=
MyFileUtil
.
writeFileContent
(
htmlContent
,
htmlFilePath
);
log
.
debug
(
"word转html成功! 生成html文件路径:【{}】"
,
htmlFilePath
);
return
htmlFile
;
}
/**
* `word` 转 `html`
*
* @param fileRootPath: 文件根位置
* @param wordFileName: 需转换的word文件名
* @param htmlFileName: 最后生成后的html文件名
* @return 生成的html文件信息
*/
public
static
String
word2HtmlContent
(
String
fileRootPath
,
String
wordFileName
,
String
htmlFileName
)
{
final
String
imagePath
=
fileRootPath
+
"/image"
;
final
String
htmlFilePath
=
fileRootPath
+
"/"
+
htmlFileName
;
// 返回word转html文件内容
String
htmlContent
=
word2Html
(
fileRootPath
,
wordFileName
,
imagePath
);
// 是否将本地临时存放图片删除 ???
// MyFileUtil.deleteFileOrFolder(imagePath);
return
htmlContent
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-file-api/src/main/java/com/yeejoin/amos/file/convert/PDFConvert.java
0 → 100644
View file @
9ac42835
package
com
.
yeejoin
.
amos
.
file
.
convert
;
import
org.apache.pdfbox.multipdf.Splitter
;
import
org.apache.pdfbox.pdmodel.PDDocument
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.ByteArrayInputStream
;
import
java.io.ByteArrayOutputStream
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.util.List
;
import
com.aspose.words.*
;
import
com.spire.pdf.FileFormat
;
import
com.spire.pdf.PdfDocument
;
import
com.spire.pdf.widget.PdfPageCollection
;
import
lombok.SneakyThrows
;
import
lombok.extern.slf4j.Slf4j
;
import
com.aspose.pdf.SvgLoadOptions
;
import
com.aspose.cells.PdfSaveOptions
;
import
com.aspose.cells.Workbook
;
@Slf4j
public
class
PDFConvert
{
// 涉及到的路径
// 1、pdf所在的路径,真实测试种是从外部引入的
/**
* 2、如果是大文件,需要进行切分,保存的子pdf路径
*/
static
String
splitPath
=
"./split/"
;
/**
* 3、如果是大文件,需要对子pdf文件一个一个进行转化
*/
static
String
docPath
=
"./doc/"
;
/**
* 将word文档转为PDF文档
*
* @param inputPath word文档所在的地址
* @param outPath 生成pdf输出的地址
* @param fileName 生成后PDF的名字<b>注意:名字不要带后缀,下面自动封装了。</b>
* @throws Exception
*/
private
static
void
word2pdf
(
String
inputPath
,
String
outPath
,
String
fileName
)
throws
Exception
{
Document
doc
=
new
Document
(
inputPath
);
// 获取控制修订外观的RevisionOptions对象
RevisionOptions
revisionOptions
=
doc
.
getLayoutOptions
().
getRevisionOptions
();
// 在引出序号中显示删除修订
revisionOptions
.
setShowInBalloons
(
ShowInBalloons
.
FORMAT_AND_DELETE
);
// 输出
doc
.
save
(
outPath
+
"\\"
+
fileName
+
".pdf"
);
}
/**
* 将word文档转为PDF文档
*
* @param inputPath word文档所在的地址
* @param outPath 生成pdf输出的地址
* @param fileName 生成后PDF的名字<b>注意:名字不要带后缀,下面自动封装了。</b>
* @throws Exception
*/
private
static
void
word2pdf
(
String
inputPath
,
OutputStream
out
,
String
fileName
)
throws
Exception
{
Document
doc
=
new
Document
(
inputPath
);
// 获取控制修订外观的RevisionOptions对象
RevisionOptions
revisionOptions
=
doc
.
getLayoutOptions
().
getRevisionOptions
();
// 在引出序号中显示删除修订
revisionOptions
.
setShowInBalloons
(
ShowInBalloons
.
FORMAT_AND_DELETE
);
doc
.
save
(
out
,
1
);
}
/**
* 将SVG转为PDF
* @param inputPath svg所在的地址
* @param outPath 生成pdf输出的地址
*/
public
static
void
svg2pdf
(
String
inputPath
,
String
outPath
){
// Instantiate LoadOption object using SVG load option
com
.
aspose
.
pdf
.
LoadOptions
options
=
new
SvgLoadOptions
();
// Create Document object
com
.
aspose
.
pdf
.
Document
document
=
new
com
.
aspose
.
pdf
.
Document
(
inputPath
,
options
);
document
.
save
(
outPath
);
}
/**
* 将SVG转为PDF
* @param inputPath svg所在的地址
* @param outPath 生成pdf输出的地址
*/
public
static
void
svg2pdf
(
String
inputPath
,
OutputStream
out
){
// Instantiate LoadOption object using SVG load option
com
.
aspose
.
pdf
.
LoadOptions
options
=
new
SvgLoadOptions
();
// Create Document object
com
.
aspose
.
pdf
.
Document
document
=
new
com
.
aspose
.
pdf
.
Document
(
inputPath
,
options
);
document
.
save
(
out
);
}
/**
*
* @param fileName 文件名称
* @param pageNum 读取的页数
* @param filePath 文件路径
* @return
*/
public
void
splitPdf
(
HttpServletResponse
response
,
int
pageNum
,
String
filePath
)
{
// 这是对应文件名
File
indexFile
=
new
File
(
filePath
);
PDDocument
document
=
null
;
try
{
document
=
PDDocument
.
load
(
indexFile
);
// 获取总页数
int
numberOfPages
=
document
.
getNumberOfPages
();
System
.
out
.
println
(
"总页数告诉你哦:"
+
numberOfPages
);
Splitter
splitter
=
new
Splitter
();
// 开始页
splitter
.
setStartPage
(
pageNum
);
// 结束页
splitter
.
setEndPage
(
pageNum
);
List
<
PDDocument
>
pages
=
splitter
.
split
(
document
);
for
(
PDDocument
pdDocument
:
pages
){
pdDocument
.
save
(
response
.
getOutputStream
());
pdDocument
.
close
();
}
document
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
/**
* `excel` 转 `pdf`
*
* @param excelBytes: html字节码
* @return 生成的`pdf`文件流
* @author zhengqing
* @date 2020/11/24 11:26
*/
@SneakyThrows
(
Exception
.
class
)
public
static
byte
[]
excelBytes2PdfBytes
(
byte
[]
excelBytes
)
{
Workbook
workbook
=
new
Workbook
(
new
ByteArrayInputStream
(
excelBytes
));
// 设置pdf保存的格式以及强制所有列都在同一页
PdfSaveOptions
pso
=
new
PdfSaveOptions
();
pso
.
setAllColumnsInOnePagePerSheet
(
true
);
ByteArrayOutputStream
outputStream
=
new
ByteArrayOutputStream
();
workbook
.
save
(
outputStream
,
pso
);
// workbook.save(outputStream, SaveFormat.PDF);
// 返回生成的`pdf`文件字节码
return
outputStream
.
toByteArray
();
}
/**
* `excel` 转 `pdf`
*
* @param excelBytes: html字节码
* @param pdfFilePath: 待生成的`pdf`文件路径
* @return 生成的`pdf`文件数据
* @author zhengqing
* @date 2020/11/24 11:26
*/
@SneakyThrows
(
Exception
.
class
)
public
static
File
excelBytes2PdfFile
(
byte
[]
excelBytes
,
String
pdfFilePath
)
{
Workbook
workbook
=
new
Workbook
(
new
ByteArrayInputStream
(
excelBytes
));
// 设置pdf保存的格式以及强制所有列都在同一页
PdfSaveOptions
pso
=
new
PdfSaveOptions
();
pso
.
setAllColumnsInOnePagePerSheet
(
true
);
workbook
.
save
(
pdfFilePath
,
pso
);
// workbook.save(outputStream, SaveFormat.PDF);
return
new
File
(
pdfFilePath
);
}
/**
*
* @param srcPath
* @param desPath
*/
public
static
void
pdf2Word
(
String
srcPath
,
String
desPath
)
{
// 4、desPath:最终生成的doc所在的目录,默认是和引入的一个地方,开源时对外提供下载的接口。
boolean
result
=
false
;
try
{
// 0、判断输入的是否是pdf文件
// 第一步:判断输入的是否合法
boolean
flag
=
isPDFFile
(
srcPath
);
// 第二步:在输入的路径下新建文件夹
boolean
flag1
=
create
();
if
(
flag
&&
flag1
)
{
// 1、加载pdf
PdfDocument
pdf
=
new
PdfDocument
();
pdf
.
loadFromFile
(
srcPath
);
PdfPageCollection
num
=
pdf
.
getPages
();
// 2、如果pdf的页数小于11,那么直接进行转化
if
(
num
.
getCount
()
<=
10
)
{
pdf
.
saveToFile
(
desPath
,
com
.
spire
.
pdf
.
FileFormat
.
DOCX
);
}
// 3、否则输入的页数比较多,就开始进行切分再转化
else
{
// 第一步:将其进行切分,每页一张pdf
pdf
.
split
(
splitPath
+
"test{0}.pdf"
,
0
);
// 第二步:将切分的pdf,一个一个进行转换
File
[]
fs
=
getSplitFiles
(
splitPath
);
for
(
File
f
:
fs
)
{
PdfDocument
sonpdf
=
new
PdfDocument
();
sonpdf
.
loadFromFile
(
f
.
getAbsolutePath
());
sonpdf
.
saveToFile
(
docPath
+
f
.
getName
().
substring
(
0
,
f
.
getName
().
length
()
-
4
)
+
".docx"
,
FileFormat
.
DOCX
);
}
// 第三步:对转化的doc文档进行合并,合并成一个大的word
try
{
result
=
merge
(
docPath
,
desPath
);
log
.
debug
(
String
.
valueOf
(
result
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
else
{
log
.
debug
(
"输入的不是pdf文件"
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
// 4、把刚刚缓存的split和doc删除
if
(
result
)
{
clearFiles
(
splitPath
);
clearFiles
(
docPath
);
}
}
log
.
debug
(
"转换成功"
);
}
private
static
boolean
create
()
{
File
f
=
new
File
(
splitPath
);
File
f1
=
new
File
(
docPath
);
if
(!
f
.
exists
())
{
f
.
mkdirs
();
}
if
(!
f
.
exists
())
{
f1
.
mkdirs
();
}
return
true
;
}
/**
* 判断是否是pdf文件
*/
private
static
boolean
isPDFFile
(
String
srcPath2
)
{
File
file
=
new
File
(
srcPath2
);
String
filename
=
file
.
getName
();
if
(
filename
.
endsWith
(
".pdf"
))
{
return
true
;
}
return
false
;
}
/**
* 取得某一路径下所有的pdf
*/
private
static
File
[]
getSplitFiles
(
String
path
)
{
File
f
=
new
File
(
path
);
File
[]
fs
=
f
.
listFiles
();
if
(
fs
==
null
)
{
return
null
;
}
return
fs
;
}
public
static
void
clearFiles
(
String
workspaceRootPath
)
{
File
file
=
new
File
(
workspaceRootPath
);
if
(
file
.
exists
())
{
deleteFile
(
file
);
}
}
public
static
void
deleteFile
(
File
file
)
{
if
(
file
.
isDirectory
())
{
File
[]
files
=
file
.
listFiles
();
for
(
int
i
=
0
;
i
<
files
.
length
;
i
++)
{
deleteFile
(
files
[
i
]);
}
}
file
.
delete
();
}
private
static
boolean
merge
(
String
docPath
,
String
desPath
)
{
File
[]
fs
=
getSplitFileList
(
docPath
);
System
.
out
.
println
(
docPath
);
com
.
spire
.
doc
.
Document
document
=
new
com
.
spire
.
doc
.
Document
(
docPath
+
"test0.docx"
);
for
(
int
i
=
1
;
i
<
fs
.
length
;
i
++)
{
document
.
insertTextFromFile
(
docPath
+
"test"
+
i
+
".docx"
,
com
.
spire
.
doc
.
FileFormat
.
Docx_2013
);
}
// 第四步:对合并的doc进行保存2
document
.
saveToFile
(
desPath
);
return
true
;
}
/**
* 取得某一路径下所有的pdf
*/
private
static
File
[]
getSplitFileList
(
String
path
)
{
File
f
=
new
File
(
path
);
return
f
.
listFiles
();
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-file-api/src/main/java/com/yeejoin/amos/file/convert/PPTConvert.java
0 → 100644
View file @
9ac42835
package
com
.
yeejoin
.
amos
.
file
.
convert
;
import
java.io.OutputStream
;
import
com.aspose.pdf.*
;
public
class
PPTConvert
{
/**
* pdf转为ppt
* @param pdfpath pdf路径
* @param pptpath ppt路径
*/
public
static
void
docx2pdf
(
String
pdfpath
,
String
pptpath
)
{
// Load source PDF file
Document
doc
=
new
Document
(
pdfpath
);
// Instantiate Doc SaveOptions instance
PptxSaveOptions
saveOptions
=
new
PptxSaveOptions
();
doc
.
save
(
pptpath
,
saveOptions
);
}
public
static
void
docx2pdf
(
String
pdfpath
,
OutputStream
out
)
{
// Load source PDF file
Document
doc
=
new
Document
(
pdfpath
);
// Instantiate Doc SaveOptions instance
PptxSaveOptions
saveOptions
=
new
PptxSaveOptions
();
// Save resultant DOCX file
doc
.
save
(
out
,
saveOptions
);
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-file-api/src/main/java/com/yeejoin/amos/file/convert/SVGConvert.java
0 → 100644
View file @
9ac42835
package
com
.
yeejoin
.
amos
.
file
.
convert
;
import
java.io.OutputStream
;
import
com.aspose.pdf.*
;
public
class
SVGConvert
{
/**
* pdf转为svg
* @param pdfpath pdf路径
* @param docxpath svg路径
*/
public
static
void
docx2pdf
(
String
pdfpath
,
String
svgpath
)
{
Document
doc
=
new
Document
(
pdfpath
);
doc
.
save
(
svgpath
);
}
/**
* svg转为docx
* @param pdfpath pdf路径
* @param OutputStream out
*/
public
static
void
docx2pdf
(
String
pdfpath
,
OutputStream
out
)
{
// Load PDF document
Document
doc
=
new
Document
(
pdfpath
);
doc
.
save
(
out
);
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-file-api/src/main/java/com/yeejoin/amos/file/dto/AllPageInfo.java
0 → 100644
View file @
9ac42835
package
com
.
yeejoin
.
amos
.
file
.
dto
;
import
java.util.ArrayList
;
import
java.util.List
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
@ApiModel
(
"文档的pdf和img信息"
)
public
class
AllPageInfo
{
@ApiModelProperty
(
"id"
)
private
String
id
;
@ApiModelProperty
(
"文档Id"
)
private
String
documentId
;
@ApiModelProperty
(
"每一页的pdf和img信息"
)
private
List
<
PageInfo
>
pageInfoList
=
new
ArrayList
<>();
public
String
getId
()
{
return
id
;
}
public
AllPageInfo
setId
(
String
id
)
{
this
.
id
=
id
;
return
this
;
}
public
String
getDocumentId
()
{
return
documentId
;
}
public
void
setDocumentId
(
String
documentId
)
{
this
.
documentId
=
documentId
;
}
public
List
<
PageInfo
>
getPageInfoList
()
{
return
pageInfoList
;
}
public
void
setPageInfoList
(
List
<
PageInfo
>
pageInfoList
)
{
this
.
pageInfoList
=
pageInfoList
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-file-api/src/main/java/com/yeejoin/amos/file/dto/CatalogInfo.java
0 → 100644
View file @
9ac42835
package
com
.
yeejoin
.
amos
.
file
.
dto
;
import
java.util.ArrayList
;
import
java.util.List
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
@ApiModel
(
"文档的目录信息"
)
public
class
CatalogInfo
{
@ApiModelProperty
(
"文档id"
)
private
String
id
;
@ApiModelProperty
(
"文档Id"
)
private
String
documentId
;
@ApiModelProperty
(
"文档名称"
)
private
String
documentName
;
@ApiModelProperty
(
"总页数"
)
private
Integer
totalPage
;
@ApiModelProperty
(
"目录信息"
)
private
List
<
ChildCatalog
>
childCatalogList
=
new
ArrayList
<>();
public
String
getId
()
{
return
id
;
}
public
CatalogInfo
setId
(
String
id
)
{
this
.
id
=
id
;
return
this
;
}
public
String
getDocumentId
()
{
return
documentId
;
}
public
void
setDocumentId
(
String
documentId
)
{
this
.
documentId
=
documentId
;
}
public
String
getDocumentName
()
{
return
documentName
;
}
public
void
setDocumentName
(
String
documentName
)
{
this
.
documentName
=
documentName
;
}
public
Integer
getTotalPage
()
{
return
totalPage
;
}
public
void
setTotalPage
(
Integer
totalPage
)
{
this
.
totalPage
=
totalPage
;
}
public
List
<
ChildCatalog
>
getChildCatalogList
()
{
return
childCatalogList
;
}
public
void
setChildCatalogList
(
List
<
ChildCatalog
>
childCatalogList
)
{
this
.
childCatalogList
=
childCatalogList
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-file-api/src/main/java/com/yeejoin/amos/file/dto/ChildCatalog.java
0 → 100644
View file @
9ac42835
package
com
.
yeejoin
.
amos
.
file
.
dto
;
import
java.util.ArrayList
;
import
java.util.List
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
@ApiModel
(
"子目录信息"
)
public
class
ChildCatalog
{
@ApiModelProperty
(
"目录Id"
)
private
String
catalogId
;
@ApiModelProperty
(
"目录名称"
)
private
String
catalogName
;
@ApiModelProperty
(
"页码"
)
private
Integer
pageNum
;
@ApiModelProperty
(
"目录层级"
)
private
Integer
catalogLevel
;
@ApiModelProperty
(
"目录在页面的位置:和页面顶部的距离"
)
private
double
position
;
@ApiModelProperty
(
"当前目录的子目录信息"
)
private
List
<
ChildCatalog
>
childCatalogList
=
new
ArrayList
<>();
public
String
getCatalogId
()
{
return
catalogId
;
}
public
void
setCatalogId
(
String
catalogId
)
{
this
.
catalogId
=
catalogId
;
}
public
String
getCatalogName
()
{
return
catalogName
;
}
public
void
setCatalogName
(
String
catalogName
)
{
this
.
catalogName
=
catalogName
;
}
public
Integer
getPageNum
()
{
return
pageNum
;
}
public
void
setPageNum
(
Integer
pageNum
)
{
this
.
pageNum
=
pageNum
;
}
public
Integer
getCatalogLevel
()
{
return
catalogLevel
;
}
public
void
setCatalogLevel
(
Integer
catalogLevel
)
{
this
.
catalogLevel
=
catalogLevel
;
}
public
double
getPosition
()
{
return
position
;
}
public
void
setPosition
(
double
position
)
{
this
.
position
=
position
;
}
public
List
<
ChildCatalog
>
getChildCatalogList
()
{
return
childCatalogList
;
}
public
void
setChildCatalogList
(
List
<
ChildCatalog
>
childCatalogList
)
{
this
.
childCatalogList
=
childCatalogList
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-file-api/src/main/java/com/yeejoin/amos/file/dto/PageInfo.java
0 → 100644
View file @
9ac42835
package
com
.
yeejoin
.
amos
.
file
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
@ApiModel
(
"每一页的pdf和img信息"
)
public
class
PageInfo
{
@ApiModelProperty
(
"页面Id"
)
private
String
pageId
;
@ApiModelProperty
(
"页码"
)
private
Integer
pageNum
;
@ApiModelProperty
(
"页面高度"
)
private
Double
height
;
@ApiModelProperty
(
"页面宽度"
)
private
Double
width
;
@ApiModelProperty
(
"pdf路径"
)
private
String
pdfUrl
;
@ApiModelProperty
(
"图片路径"
)
private
String
imgUrl
;
@ApiModelProperty
(
"正文"
)
private
String
content
;
public
PageInfo
(
Integer
pageNum
,
Double
height
,
Double
width
,
String
pdfUrl
,
String
imgUrl
,
String
content
)
{
this
.
pageNum
=
pageNum
;
this
.
height
=
height
;
this
.
width
=
width
;
this
.
pdfUrl
=
pdfUrl
;
this
.
imgUrl
=
imgUrl
;
this
.
content
=
content
;
}
public
String
getPageId
()
{
return
pageId
;
}
public
void
setPageId
(
String
pageId
)
{
this
.
pageId
=
pageId
;
}
public
Integer
getPageNum
()
{
return
pageNum
;
}
public
void
setPageNum
(
Integer
pageNum
)
{
this
.
pageNum
=
pageNum
;
}
public
double
getHeight
()
{
return
height
;
}
public
void
setHeight
(
Double
height
)
{
this
.
height
=
height
;
}
public
Double
getWidth
()
{
return
width
;
}
public
void
setWidth
(
Double
width
)
{
this
.
width
=
width
;
}
public
String
getPdfUrl
()
{
return
pdfUrl
;
}
public
void
setPdfUrl
(
String
pdfUrl
)
{
this
.
pdfUrl
=
pdfUrl
;
}
public
String
getImgUrl
()
{
return
imgUrl
;
}
public
void
setImgUrl
(
String
imgUrl
)
{
this
.
imgUrl
=
imgUrl
;
}
public
String
getContent
()
{
return
content
;
}
public
void
setContent
(
String
content
)
{
this
.
content
=
content
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-file-api/src/main/java/com/yeejoin/amos/file/service/SpiltService.java
0 → 100644
View file @
9ac42835
package
com
.
yeejoin
.
amos
.
file
.
service
;
import
java.awt.image.BufferedImage
;
import
java.io.BufferedWriter
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.OutputStreamWriter
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
javax.imageio.ImageIO
;
import
org.apache.pdfbox.pdmodel.PDDocument
;
import
org.apache.pdfbox.rendering.ImageType
;
import
org.apache.pdfbox.rendering.PDFRenderer
;
import
org.fit.pdfdom.PDFDomTree
;
import
org.springframework.core.io.ClassPathResource
;
import
org.springframework.stereotype.Service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.aspose.words.License
;
import
com.itextpdf.text.Document
;
import
com.itextpdf.text.DocumentException
;
import
com.itextpdf.text.Rectangle
;
import
com.itextpdf.text.pdf.PdfCopy
;
import
com.itextpdf.text.pdf.PdfImportedPage
;
import
com.itextpdf.text.pdf.PdfReader
;
import
com.itextpdf.text.pdf.SimpleBookmark
;
import
com.itextpdf.text.pdf.parser.PdfTextExtractor
;
import
com.yeejoin.amos.file.config.MatchLicense
;
import
com.yeejoin.amos.file.convert.DocConvert
;
import
com.yeejoin.amos.file.convert.HTMLConvert
;
import
com.yeejoin.amos.file.dto.CatalogInfo
;
import
com.yeejoin.amos.file.dto.ChildCatalog
;
import
com.yeejoin.amos.file.utils.HelpUtil
;
@Service
public
class
SpiltService
{
/**
* 按行提取文本
* @param file
* @return List<String>
*/
public
static
List
<
String
>
extractTXTbyLine
(
String
file
)
{
List
<
String
>
listArr
=
new
ArrayList
<
String
>();
try
{
PdfReader
reader
=
new
PdfReader
(
file
);
int
pageNum
=
reader
.
getNumberOfPages
();
// 获得页数
for
(
int
i
=
1
;
i
<=
pageNum
;
i
++)
{
// 只能从第1页开始读
String
textFromPageContent
=
PdfTextExtractor
.
getTextFromPage
(
reader
,
i
);
String
[]
splitArray
=
textFromPageContent
.
split
(
"\n"
);
if
(
splitArray
.
length
>
0
)
{
listArr
.
addAll
(
Arrays
.
asList
(
splitArray
));
}
}
}
catch
(
IOException
ex
)
{
ex
.
printStackTrace
();
}
return
listArr
;
}
/*
pdf转换html
*/
public
static
void
pdfToHtmlTest
(
String
inPdfPath
,
String
outputHtmlPath
)
{
// String outputPath = "C:\\works\\files\\ZSQ保密知识测试题库.html";
//try() 写在()里面会自动关闭流
try
{
BufferedWriter
out
=
new
BufferedWriter
(
new
OutputStreamWriter
(
new
FileOutputStream
(
new
File
(
outputHtmlPath
)),
"utf-8"
));
//加载PDF文档
//PDDocument document = PDDocument.load(bytes);
PDDocument
document
=
PDDocument
.
load
(
new
File
(
inPdfPath
));
PDFDomTree
pdfDomTree
=
new
PDFDomTree
();
pdfDomTree
.
writeText
(
document
,
out
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
// public static void main(String[] args) throws IOException {
// String pdfPath="F:\\\\文档\\\\空工大\\\\使用维护说明书-20221024.pdf";
//// String outputPath="F:\\\\文档\\\\空工大\\\\使用维护说明书-20221024.html";
//// pdfToHtmlTest(pdfPath,outputPath);
//
// List<String> strings = extractTXTbyLine(pdfPath);
// for (String s : strings) {
// System.out.println(s);
// }
// }
public
static
void
main
(
String
[]
args
)
throws
Exception
{
try
{
/*
实现匹配文件授权 -> 去掉头部水印 `Evaluation Only. Created with Aspose.Words. Copyright 2003-2018 Aspose Pty Ltd.` |
`Evaluation Only. Created with Aspose.Cells for Java. Copyright 2003 - 2020 Aspose Pty Ltd.`
*/
File
file
=
new
File
(
"E:\\test\\test1\\license.xml"
);
InputStream
is
=
new
FileInputStream
(
file
);
License
license
=
new
License
();
license
.
setLicense
(
is
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
MatchLicense
.
init
();
String
filePath
=
"E:\\test\\test1\\test.pdf"
;
String
htmlpath
=
"E:\\test\\test1\\test.html"
;
HTMLConvert
.
pdf2html
(
filePath
,
htmlpath
);
// DocConvert.pdf2docx(filePath, htmlpath);
// HTMLConvert.pdf2html2(filePath, htmlpath);
}
// public static void main(String[] args) {
// String filePath = "E:\\test\\test1\\使用维护说明书-20221024.pdf";
// String fileName = "使用维护说明书-20221024.pdf";
// try {
// CatalogInfo catalogInfo = getCatalog(filePath, fileName);
// JSONObject json = (JSONObject) JSONObject.toJSON(catalogInfo);
// System.out.println(json.toString());
// } catch (IOException e) {
// e.printStackTrace();
// }
// }
public
static
CatalogInfo
getCatalog
(
String
filePath
,
String
bookName
)
throws
IOException
{
PdfReader
pdfReader
=
null
;
pdfReader
=
new
PdfReader
(
filePath
);
CatalogInfo
catalogInfo
=
new
CatalogInfo
();
catalogInfo
.
setDocumentName
(
bookName
);
catalogInfo
.
setTotalPage
(
pdfReader
.
getNumberOfPages
());
List
<
HashMap
<
String
,
Object
>>
list
=
SimpleBookmark
.
getBookmark
(
pdfReader
);
if
(
list
!=
null
)
{
list
.
forEach
(
it
->
{
if
(
it
.
get
(
"Page"
)
!=
null
)
{
int
j
=
1
;
ChildCatalog
childCatalog
=
new
ChildCatalog
();
//层级
childCatalog
.
setCatalogLevel
(
j
);
//目录id
childCatalog
.
setCatalogId
(
HelpUtil
.
generateId
());
childCatalog
.
setCatalogName
(
it
.
get
(
"Title"
)
==
null
?
""
:
it
.
get
(
"Title"
).
toString
());
//获取目录 所在 文件 位置
String
pagePosition
=
it
.
get
(
"Page"
).
toString
();
showBookmark
(
it
,
j
,
childCatalog
);
getPosition
(
childCatalog
,
pagePosition
);
catalogInfo
.
getChildCatalogList
().
add
(
childCatalog
);
}
});
}
return
catalogInfo
;
}
public
static
void
spiltPdf
(
String
bookId
,
String
bookUrl
,
String
bookName
,
String
filePath
,
String
filePrefix
)
throws
Exception
{
if
(!
bookUrl
.
endsWith
(
".pdf"
))
{
throw
new
Exception
(
"不是pdf文件"
);
}
if
(
bookUrl
.
startsWith
(
filePrefix
))
{
bookUrl
=
bookUrl
.
substring
(
filePrefix
.
length
());
}
String
pdfFilePath
=
filePath
+
bookUrl
;
//保存文件路径
String
savePath
=
""
;
int
dot
=
pdfFilePath
.
lastIndexOf
(
'.'
);
if
((
dot
>
-
1
)
&&
(
dot
<
(
pdfFilePath
.
length
())))
{
savePath
=
pdfFilePath
.
substring
(
0
,
dot
);
}
splitPDFOneByOne
(
pdfFilePath
,
savePath
,
bookId
,
bookName
);
}
/**
* // * @param path 源PDF路径
* // * @param fileName 源PDF文件名
*
* @param outputPath 拆分后输出的PDF路径
* @param bookId
* @Param pathUrl 文件路径
* @author Reverse_XML
* 把PDF 按页(逐页、单页)拆分(一页一页拆分,一页为一个新PDF文件)
*/
public
static
void
splitPDFOneByOne
(
String
pathUrl
,
String
outputPath
,
String
bookId
,
String
bookName
)
{
String
sep
=
java
.
io
.
File
.
separator
;
PdfReader
reader
=
null
;
int
numberOfPages
=
0
;
try
{
// reader = new PdfReader(path + sep + fileName);
reader
=
new
PdfReader
(
pathUrl
);
//获取目录结构
getBookMark
(
reader
,
bookId
,
bookName
);
numberOfPages
=
reader
.
getNumberOfPages
();
File
filePath
=
new
File
(
outputPath
);
if
(!
filePath
.
exists
())
{
filePath
.
mkdirs
();
}
//切成单页jpg文件
List
<
String
>
list
=
pdfPathToImagePaths
(
pathUrl
,
outputPath
);
//切成单页pdf
for
(
int
i
=
1
;
i
<=
numberOfPages
;
i
++)
{
Document
document
=
null
;
PdfCopy
copy
=
null
;
try
{
document
=
new
Document
(
reader
.
getPageSize
(
1
));
Rectangle
pageSize
=
reader
.
getPageSize
(
1
);
String
textFromPage
=
PdfTextExtractor
.
getTextFromPage
(
reader
,
i
);
float
height
=
pageSize
.
getHeight
();
float
width
=
pageSize
.
getWidth
();
String
savePath
=
outputPath
+
sep
+
(
i
-
1
)
+
".pdf"
;
//fileName.substring(0, fileName.lastIndexOf(".")) + "_" + (i-1) + ".pdf";
try
{
copy
=
new
PdfCopy
(
document
,
new
FileOutputStream
(
savePath
));
}
catch
(
DocumentException
e
)
{
e
.
printStackTrace
();
}
document
.
open
();
document
.
newPage
();
PdfImportedPage
page
=
copy
.
getImportedPage
(
reader
,
i
);
copy
.
addPage
(
page
);
}
finally
{
if
(
document
!=
null
)
document
.
close
();
if
(
copy
!=
null
)
copy
.
close
();
}
}
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
e
.
getMessage
());
}
catch
(
DocumentException
e
)
{
System
.
out
.
println
(
e
.
getMessage
());
}
finally
{
if
(
reader
!=
null
)
reader
.
close
();
}
}
/**
* png文件路径
*
* @param pdfPath pdf完整路径
* @param outputPath 输出路径
* @return png集合
*/
private
static
List
<
String
>
pdfPathToImagePaths
(
String
pdfPath
,
String
outputPath
)
throws
IOException
{
File
pdfFile
=
new
File
(
pdfPath
);
PDDocument
pdDocument
=
PDDocument
.
load
(
pdfFile
);
int
pageCount
=
pdDocument
.
getNumberOfPages
();
PDFRenderer
pdfRenderer
=
new
PDFRenderer
(
pdDocument
);
List
<
String
>
imagePathList
=
new
ArrayList
<>();
for
(
int
pageIndex
=
0
;
pageIndex
<
pageCount
;
pageIndex
++)
{
String
imgPath
=
outputPath
+
File
.
separator
+
pageIndex
+
".png"
;
BufferedImage
image
=
pdfRenderer
.
renderImageWithDPI
(
pageIndex
,
72
,
ImageType
.
RGB
);
System
.
out
.
println
(
image
.
getHeight
());
System
.
out
.
println
(
image
.
getWidth
());
ImageIO
.
write
(
image
,
"png"
,
new
File
(
imgPath
));
imagePathList
.
add
(
imgPath
);
}
pdDocument
.
close
();
return
imagePathList
;
}
/**
* 获取目录列表
*
* @param pdfReader
*/
private
static
void
getBookMark
(
PdfReader
pdfReader
,
String
bookId
,
String
bookName
)
{
CatalogInfo
catalogInfo
=
new
CatalogInfo
();
catalogInfo
.
setDocumentId
(
bookId
);
catalogInfo
.
setId
(
bookId
);
catalogInfo
.
setDocumentName
(
bookName
);
catalogInfo
.
setTotalPage
(
pdfReader
.
getNumberOfPages
());
List
<
HashMap
<
String
,
Object
>>
list
=
SimpleBookmark
.
getBookmark
(
pdfReader
);
if
(
list
!=
null
)
{
list
.
forEach
(
it
->
{
if
(
it
.
get
(
"Page"
)
!=
null
)
{
int
j
=
1
;
ChildCatalog
childCatalog
=
new
ChildCatalog
();
//层级
childCatalog
.
setCatalogLevel
(
j
);
//目录id
childCatalog
.
setCatalogId
(
HelpUtil
.
generateId
());
childCatalog
.
setCatalogName
(
it
.
get
(
"Title"
)
==
null
?
""
:
it
.
get
(
"Title"
).
toString
());
//获取目录 所在 文件 位置
String
pagePosition
=
it
.
get
(
"Page"
).
toString
();
showBookmark
(
it
,
j
,
childCatalog
);
getPosition
(
childCatalog
,
pagePosition
);
catalogInfo
.
getChildCatalogList
().
add
(
childCatalog
);
}
});
}
}
/**
* @param bookmark 目录
* @param level 层级
* @return
*/
private
static
ChildCatalog
showBookmark
(
HashMap
<
String
,
Object
>
bookmark
,
int
level
,
ChildCatalog
catalog
)
{
//子目录
ChildCatalog
childCatalog
=
new
ChildCatalog
();
//不是第一层级的才新增
if
(
level
!=
1
)
{
if
(
bookmark
.
get
(
"Page"
)
!=
null
){
childCatalog
.
setCatalogName
(
bookmark
.
get
(
"Title"
)
!=
null
?
bookmark
.
get
(
"Title"
).
toString
()
:
""
);
childCatalog
.
setCatalogId
(
HelpUtil
.
generateId
());
childCatalog
.
setCatalogLevel
(
level
);
String
pagePosition
=
bookmark
.
get
(
"Page"
).
toString
();
getPosition
(
childCatalog
,
pagePosition
);
catalog
.
getChildCatalogList
().
add
(
childCatalog
);
}
}
else
{
childCatalog
=
catalog
;
}
ArrayList
kids
=
(
ArrayList
)
bookmark
.
get
(
"Kids"
);
if
(
kids
!=
null
)
{
level
++;
int
finalLevel
=
level
;
ChildCatalog
finalChildCatalog
=
childCatalog
;
kids
.
forEach
(
it
->
showBookmark
((
HashMap
<
String
,
Object
>)
it
,
finalLevel
,
finalChildCatalog
));
}
return
catalog
;
}
/**
* 获取目录所在 文件位置
*
* @param childCatalog 目录记录行
* @param pagePosition 目录在页面中的位置
*/
private
static
void
getPosition
(
ChildCatalog
childCatalog
,
String
pagePosition
)
{
//页码数据位置
//34 XYZ 365.35 161.9 0
String
[]
s
=
pagePosition
.
split
(
" "
);
//解析出页码
childCatalog
.
setPageNum
(
Integer
.
valueOf
(
s
[
0
]));
//解析出 y 轴坐标
childCatalog
.
setPosition
(
Double
.
parseDouble
(
s
[
3
]));
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-file-api/src/main/java/com/yeejoin/amos/file/service/license.xml
0 → 100644
View file @
9ac42835
<License>
<Data>
<Products>
<Product>
Aspose.Total for Java
</Product>
<Product>
Aspose.Words for Java
</Product>
</Products>
<EditionType>
Enterprise
</EditionType>
<SubscriptionExpiry>
20991231
</SubscriptionExpiry>
<LicenseExpiry>
20991231
</LicenseExpiry>
<SerialNumber>
8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7
</SerialNumber>
</Data>
<Signature>
sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=
</Signature>
</License>
amos-boot-module/amos-boot-module-api/amos-boot-module-file-api/src/main/java/com/yeejoin/amos/file/utils/HelpUtil.java
0 → 100644
View file @
9ac42835
package
com
.
yeejoin
.
amos
.
file
.
utils
;
import
java.time.LocalDateTime
;
import
java.time.ZoneId
;
import
java.util.Date
;
import
java.util.UUID
;
/**
* @author jinly
* @date 2020/9/25
*/
public
class
HelpUtil
{
/**
* 自动生成id
*
* @return id
*/
public
static
String
generateId
()
{
return
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
);
}
/**
* date 转 localDateTime
*/
public
static
Date
localDateTimeToDate
(
LocalDateTime
localDateTime
)
{
if
(
localDateTime
==
null
)
{
return
null
;
}
return
Date
.
from
(
localDateTime
.
atZone
(
ZoneId
.
systemDefault
()).
toInstant
());
}
/**
* localDateTime 转date
*/
public
static
LocalDateTime
dateToLocalDateTime
(
Date
date
)
{
if
(
date
==
null
)
{
return
null
;
}
return
date
.
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDateTime
();
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-file-api/src/main/java/com/yeejoin/amos/file/utils/MyFileUtil.java
0 → 100644
View file @
9ac42835
package
com
.
yeejoin
.
amos
.
file
.
utils
;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.core.util.ZipUtil
;
import
lombok.SneakyThrows
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.io.FileUtils
;
import
java.io.File
;
import
java.io.InputStream
;
import
java.nio.charset.Charset
;
/**
* <p>
* 文件工具类
* </p>
*
* @author zhengqing
* @description
* @date 2020/8/27 19:21
*/
@Slf4j
public
class
MyFileUtil
{
/**
* 多文件或目录压缩:将`srcPath`目录以及其目录下的所有文件目录打包到`zipPath`+`suffixFileName`文件中 【采用hutool工具类进行打包文件】
*
* @param srcPath: 需打包的源目录
* @param zipPath: 打包后的路径+文件后缀名
* @param isWithSrcDir: 是否带目录显示 (true:表示带目录显示)
* @param isDeleteSrcZip: 是否删除源目录
* @return java.lang.String
* @author zhengqing
* @date 2020/8/27 19:25
*/
public
static
File
zip
(
String
srcPath
,
String
zipPath
,
boolean
isWithSrcDir
,
boolean
isDeleteSrcZip
)
{
log
.
debug
(
"【压缩文件】 源目录路径: 【{}】 打包后的路径+文件后缀名: 【{}】"
,
srcPath
,
zipPath
);
File
zipFile
=
ZipUtil
.
zip
(
srcPath
,
zipPath
,
isWithSrcDir
);
// 删除目录 -> 保证下次生成文件的时候不会累计上次留下的文件
if
(
isDeleteSrcZip
)
{
MyFileUtil
.
deleteFileOrFolder
(
srcPath
);
}
return
zipFile
;
}
/**
* 根据路径删除指定的目录或文件,无论存在与否
*
* @param fullFileOrDirPath: 要删除的目录或文件
* @return 删除成功返回 true,否则返回 false
* @author zhengqing
* @date 2020/9/5 20:56
*/
public
static
boolean
deleteFileOrFolder
(
String
fullFileOrDirPath
)
{
return
FileUtil
.
del
(
fullFileOrDirPath
);
}
/**
* 根据路径创建文件
*
* @param fullFilePath: 文件生成路径
* @return 文件信息
* @author zhengqing
* @date 2020/9/8 21:41
*/
public
static
File
touch
(
String
fullFilePath
)
{
return
FileUtil
.
touch
(
fullFilePath
);
}
/**
* 解压
*
* @param inputStream: 流
* @param zipFilePath: zip文件路径
* @param outFileDir: 解压后的目录路径
* @param isDeleteZip: 是否删除源zip文件
* @return 解压后的文件File信息
* @author zhengqing
* @date 2020/9/5 20:50
*/
@SneakyThrows
(
Exception
.
class
)
public
static
File
unzip
(
InputStream
inputStream
,
String
zipFilePath
,
String
outFileDir
,
boolean
isDeleteZip
)
{
log
.
debug
(
"【解压文件】 zip文件路径: 【{}】 解压后的目录路径: 【{}】"
,
zipFilePath
,
outFileDir
);
// zip压缩文件
File
zipFile
=
FileUtil
.
newFile
(
zipFilePath
);
// 写入文件
FileUtils
.
copyInputStreamToFile
(
inputStream
,
zipFile
);
// 编码方式 "UTF-8" 、"GBK" 【注: gbk编码才能解决报错: java.lang.IllegalArgumentException: MALFORMED】
File
outFile
=
ZipUtil
.
unzip
(
zipFilePath
,
outFileDir
,
Charset
.
forName
(
"GBK"
));
// 删除zip -> 保证下次解压后的文件数据不会累计上次解压留下的文件
if
(
isDeleteZip
)
{
MyFileUtil
.
deleteFileOrFolder
(
zipFilePath
);
}
return
outFile
;
}
/**
* 读取文件内容
*
* @param file: 文件数据
* @return 文件内容
* @author zhengqing
* @date 2020/9/5 23:00
*/
public
static
String
readFileContent
(
File
file
)
{
return
FileUtil
.
readUtf8String
(
file
);
}
/**
* 读取文件内容
*
* @param filePath: 文件路径
* @return 文件内容
* @author zhengqing
* @date 2020/9/5 23:00
*/
public
static
String
readFileContent
(
String
filePath
)
{
return
FileUtil
.
readUtf8String
(
filePath
);
}
/**
* 读取文件数据
*
* @param filePath: 文件路径
* @return 文件字节码
* @author zhengqing
* @date 2020/9/5 23:00
*/
public
static
byte
[]
readBytes
(
String
filePath
)
{
return
FileUtil
.
readBytes
(
filePath
);
}
/**
* 写入文件内容
*
* @param fileContent: 文件内容
* @param filePath: 文件路径
* @return 文件信息
* @author zhengqing
* @date 2020/11/17 21:38
*/
@SneakyThrows
(
Exception
.
class
)
public
static
File
writeFileContent
(
String
fileContent
,
String
filePath
)
{
return
FileUtil
.
writeUtf8String
(
fileContent
,
filePath
);
}
/**
* 字节码写入文件
*
* @param data: 字节码
* @param filePath: 文件路径
* @return 文件信息
* @author zhengqing
* @date 2020/11/24 14:36
*/
@SneakyThrows
(
Exception
.
class
)
public
static
File
writeFileContent
(
byte
[]
data
,
String
filePath
)
{
return
FileUtil
.
writeBytes
(
data
,
filePath
);
}
public
static
void
main
(
String
[]
args
)
{
try
{
String
filePath
=
"E:\\IT_zhengqing\\code\\me-workspace\\最新代码生成器\\code-api\\document\\import\\blog.zip"
;
String
filePathX
=
"E:\\IT_zhengqing\\code\\me-workspace\\最新代码生成器\\code-api\\document\\import"
;
// File file =
// FileUtil.newFile(filePath);
// InputStream fileInputStream = new FileInputStream(file);
File
unzip
=
ZipUtil
.
unzip
(
filePath
,
filePathX
);
System
.
out
.
println
(
unzip
);
String
fileContent
=
FileUtil
.
readUtf8String
(
filePath
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-file-api/src/main/java/com/yeejoin/amos/file/utils/WkHtmlUtil.java
0 → 100644
View file @
9ac42835
package
com
.
yeejoin
.
amos
.
file
.
utils
;
import
cn.hutool.core.io.FileUtil
;
import
lombok.SneakyThrows
;
import
lombok.extern.slf4j.Slf4j
;
import
net.coobird.thumbnailator.Thumbnails
;
import
java.io.IOException
;
import
com.yeejoin.amos.file.config.Constants
;
/**
* <p>
* html 转 图片或pdf 工具类
* </p>
*
* @author zhengqingya
* @description https://wkhtmltopdf.org
* html转pdf: wkhtmltopdf https://zhengqing.blog.csdn.net zhengqingya.pdf
* html转图片: wkhtmltoimage https://zhengqing.blog.csdn.net zhengqingya.png
* 帮助 wkhtmltopdf -h 或 wkhtmltoimage -h
* @date 2021/8/11 9:54 下午
*/
@Slf4j
public
class
WkHtmlUtil
{
/**
* 工具根目录
*/
private
static
final
String
TOOL_WIN_ROOT_DIRECTORY
=
"D:/zhengqingya/soft/soft-dev/wkhtmltopdf/bin/"
;
public
static
void
main
(
String
[]
args
)
throws
Exception
{
String
sourceFilePath
=
"https://zhengqing.blog.csdn.net"
;
String
targetPngFilePath
=
Constants
.
DEFAULT_FOLDER_TMP_GENERATE
+
"/zhengqingya.png"
;
String
targetPdfFilePath
=
Constants
.
DEFAULT_FOLDER_TMP_GENERATE
+
"/zhengqingya.pdf"
;
// 设置宽高
String
cmdByImage
=
"--crop-w 150 --crop-h 150 --quality 100"
;
// byte[] imageBytes = html2ImageBytes(cmdByImage, sourceFilePath, targetPngFilePath);
byte
[]
imageBytesByCompress
=
html2ImageBytesByCompress
(
cmdByImage
,
sourceFilePath
,
targetPngFilePath
);
byte
[]
pdfBytes
=
html2PdfBytes
(
""
,
sourceFilePath
,
targetPdfFilePath
);
}
/**
* html转图片
*
* @param cmd 工具操作指令
* @param sourceFilePath html源资源
* @param targetFilePath 生成目标资源
* @return 图片字节码
* @author zhengqingya
* @date 2021/8/12 11:09
*/
public
static
byte
[]
html2ImageBytes
(
String
cmd
,
String
sourceFilePath
,
String
targetFilePath
)
{
return
baseTool
(
"wkhtmltoimage"
,
cmd
,
sourceFilePath
,
targetFilePath
);
}
/**
* html转图片 - 图片压缩版
*
* @param cmd 工具操作指令
* @param sourceFilePath html源资源
* @param targetFilePath 生成目标资源
* @return 图片字节码
* @author zhengqingya
* @date 2021/8/12 11:09
*/
@SneakyThrows
(
Exception
.
class
)
public
static
byte
[]
html2ImageBytesByCompress
(
String
cmd
,
String
sourceFilePath
,
String
targetFilePath
)
{
String
filePath
=
baseToolForPath
(
"wkhtmltoimage"
,
cmd
,
sourceFilePath
,
targetFilePath
);
Thumbnails
.
of
(
filePath
)
.
scale
(
1
f
)
.
toFile
(
targetFilePath
);
return
FileUtil
.
readBytes
(
targetFilePath
);
}
/**
* html转pdf
*
* @param cmd 工具操作指令
* @param sourceFilePath html源资源
* @param targetFilePath 生成目标资源
* @return pdf字节码
* @author zhengqingya
* @date 2021/8/12 11:09
*/
public
static
byte
[]
html2PdfBytes
(
String
cmd
,
String
sourceFilePath
,
String
targetFilePath
)
{
return
baseTool
(
"wkhtmltopdf"
,
cmd
,
sourceFilePath
,
targetFilePath
);
}
/**
* 工具基础操作
*
* @param tool 工具
* @param cmd 工具操作指令
* @param sourceFilePath html源资源
* @param targetFilePath 生成目标资源
* @return 字节码
* @author zhengqingya
* @date 2021/8/12 11:08
*/
@SneakyThrows
({
Exception
.
class
})
private
static
byte
[]
baseTool
(
String
tool
,
String
cmd
,
String
sourceFilePath
,
String
targetFilePath
)
{
String
filePath
=
baseToolForPath
(
tool
,
cmd
,
sourceFilePath
,
targetFilePath
);
return
FileUtil
.
readBytes
(
filePath
);
}
/**
* 工具基础操作
*
* @param tool 工具
* @param cmd 工具操作指令
* @param sourceFilePath html源资源
* @param targetFilePath 生成目标资源
* @return 生成资源路径
* @author zhengqingya
* @date 2021/8/12 11:08
*/
@SneakyThrows
({
Exception
.
class
})
private
static
String
baseToolForPath
(
String
tool
,
String
cmd
,
String
sourceFilePath
,
String
targetFilePath
)
{
// 先创建父目录
FileUtil
.
mkParentDirs
(
targetFilePath
);
String
command
=
String
.
format
(
"%s %s %s %s"
,
getToolRootPath
()
+
tool
,
cmd
,
sourceFilePath
,
targetFilePath
);
Process
process
=
null
;
try
{
process
=
Runtime
.
getRuntime
().
exec
(
command
);
}
catch
(
IOException
e
)
{
throw
new
Exception
(
"工具丢失,请联系系统管理员!"
);
}
// 等待当前命令执行完,再往下执行
process
.
waitFor
();
log
.
info
(
"=============== FINISH: [{}] ==============="
,
command
);
return
targetFilePath
;
}
/**
* 根据不同系统获取工具
*
* @return 工具位置
* @author zhengqingya
* @date 2021/8/12 11:07
*/
private
static
String
getToolRootPath
()
{
String
system
=
System
.
getProperty
(
"os.name"
);
if
(
system
.
contains
(
"Windows"
))
{
return
TOOL_WIN_ROOT_DIRECTORY
;
}
else
if
(
system
.
contains
(
"Linux"
)
||
system
.
contains
(
"Mac OS X"
))
{
return
""
;
}
return
""
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-file-api/src/main/resources/license.xml
0 → 100644
View file @
9ac42835
<License>
<Data>
<Products>
<Product>
Aspose.Total for Java
</Product>
</Products>
<EditionType>
Enterprise
</EditionType>
<SubscriptionExpiry>
29991231
</SubscriptionExpiry>
<LicenseExpiry>
29991231
</LicenseExpiry>
<SerialNumber>
8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7
</SerialNumber>
</Data>
<Signature>
sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=
</Signature>
</License>
\ No newline at end of file
amos-boot-module/amos-boot-module-api/pom.xml
View file @
9ac42835
...
...
@@ -28,5 +28,6 @@
<module>
amos-boot-module-ccs-api
</module>
<module>
amos-boot-module-avic-api
</module>
<module>
amos-boot-module-kgd-api
</module>
<module>
amos-boot-module-file-api
</module>
</modules>
</project>
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-file-biz/.factorypath
0 → 100644
View file @
9ac42835
<factorypath>
<factorypathentry kind="EXTJAR" id="F:\git\amos-boot-biz\amos-boot-module\amos-boot-module-api\amos-boot-module-avic-api\lib\commons-io-2.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="EXTJAR" id="F:\git\amos-boot-biz\amos-boot-module\amos-boot-module-api\amos-boot-module-avic-api\lib\mailapi-1.5.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="EXTJAR" id="F:\git\amos-boot-biz\amos-boot-module\amos-boot-module-api\amos-boot-module-avic-api\lib\smtp-1.5.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-spring-boot-starter-jaxws/3.2.6/cxf-spring-boot-starter-jaxws-3.2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter/2.3.11.RELEASE/spring-boot-starter-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot/2.3.11.RELEASE/spring-boot-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-autoconfigure/2.3.11.RELEASE/spring-boot-autoconfigure-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-core/5.2.15.RELEASE/spring-core-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-jcl/5.2.15.RELEASE/spring-jcl-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/yaml/snakeyaml/1.26/snakeyaml-1.26.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-spring-boot-autoconfigure/3.2.6/cxf-spring-boot-autoconfigure-3.2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-transports-http/3.2.6/cxf-rt-transports-http-3.2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-core/3.2.6/cxf-core-3.2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/woodstox/woodstox-core/5.1.0/woodstox-core-5.1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/ws/xmlschema/xmlschema-core/2.2.3/xmlschema-core-2.2.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-frontend-jaxws/3.2.6/cxf-rt-frontend-jaxws-3.2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-bindings-soap/3.2.6/cxf-rt-bindings-soap-3.2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-wsdl/3.2.6/cxf-rt-wsdl-3.2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/wsdl4j/wsdl4j/1.6.3/wsdl4j-1.6.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-databinding-jaxb/3.2.6/cxf-rt-databinding-jaxb-3.2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-bindings-xml/3.2.6/cxf-rt-bindings-xml-3.2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-frontend-simple/3.2.6/cxf-rt-frontend-simple-3.2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-ws-addr/3.2.6/cxf-rt-ws-addr-3.2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/cxf/cxf-rt-ws-policy/3.2.6/cxf-rt-ws-policy-3.2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/neethi/neethi/3.1.1/neethi-3.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/validation/validation-api/2.0.1.Final/validation-api-2.0.1.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/yeejoin/indicators-feign/1.0.4-SNAPSHOT/indicators-feign-1.0.4-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/yeejoin/maas/access-api/4.4.0-SNAPSHOT/access-api-4.4.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/yeejoin/maas/common-tools/1.0.1-SNAPSHOT/common-tools-1.0.1-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-codec/commons-codec/1.14/commons-codec-1.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.11.4/jackson-core-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/yeejoin/amos-component-feign/1.1.0-SNAPSHOT/amos-component-feign-1.1.0-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-starter-openfeign/2.2.5.RELEASE/spring-cloud-starter-openfeign-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-openfeign-core/2.2.5.RELEASE/spring-cloud-openfeign-core-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/github/openfeign/form/feign-form-spring/3.8.0/feign-form-spring-3.8.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/github/openfeign/form/feign-form/3.8.0/feign-form-3.8.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-io/commons-io/2.2/commons-io-2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/github/openfeign/feign-core/10.10.1/feign-core-10.10.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/github/openfeign/feign-slf4j/10.10.1/feign-slf4j-10.10.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/github/openfeign/feign-hystrix/10.10.1/feign-hystrix-10.10.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/servlet/javax.servlet-api/4.0.1/javax.servlet-api-4.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/typroject/tyboot-component-cache/1.1.20Ty-SNAPSHOT/tyboot-component-cache-1.1.20Ty-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-redis/1.4.5.RELEASE/spring-boot-starter-redis-1.4.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-redis/2.3.9.RELEASE/spring-data-redis-2.3.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-keyvalue/2.3.9.RELEASE/spring-data-keyvalue-2.3.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/data/spring-data-commons/2.3.9.RELEASE/spring-data-commons-2.3.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-oxm/5.2.15.RELEASE/spring-oxm-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/redis/clients/jedis/3.3.0/jedis-3.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-pool2/2.8.1/commons-pool2-2.8.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/zipkin/brave/brave/5.12.3/brave-5.12.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/zipkin/reporter2/zipkin-reporter-brave/2.15.0/zipkin-reporter-brave-2.15.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/zipkin/reporter2/zipkin-reporter/2.15.0/zipkin-reporter-2.15.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/zipkin/zipkin2/zipkin/2.21.1/zipkin-2.21.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.11.4/jackson-databind-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.11.4/jackson-annotations-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/yeejoin/amos-feign-systemctl/1.7.3-SNAPSHOT/amos-feign-systemctl-1.7.3-SNAPSHOT.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/typroject/tyboot-core-foundation/1.1.21/tyboot-core-foundation-1.1.21.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/belerweb/pinyin4j/2.5.0/pinyin4j-2.5.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-beanutils/commons-beanutils/1.9.2/commons-beanutils-1.9.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/esotericsoftware/reflectasm/reflectasm/1.09/reflectasm-1.09.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/axet/kaptcha/0.0.9/kaptcha-0.0.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/jhlabs/filters/2.0.235/filters-2.0.235.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/typroject/tyboot-component-event/1.1.20/tyboot-component-event-1.1.20.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-aop/2.3.11.RELEASE/spring-boot-starter-aop-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-aop/5.2.15.RELEASE/spring-aop-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-logging/2.3.11.RELEASE/spring-boot-starter-logging-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-to-slf4j/2.13.3/log4j-to-slf4j-2.13.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/jul-to-slf4j/1.7.30/jul-to-slf4j-1.7.30.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-api/2.17.0/log4j-api-2.17.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-mock/2.0.8/spring-mock-2.0.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/logkit/logkit/1.0.1/logkit-1.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/avalon-framework/avalon-framework/4.1.3/avalon-framework-4.1.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/junit/junit/4.13.2/junit-4.13.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hamcrest/hamcrest-core/2.2/hamcrest-core-2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hamcrest/hamcrest/2.2/hamcrest-2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/typroject/tyboot-core-rdbms/1.1.20/tyboot-core-rdbms-1.1.20.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/zaxxer/HikariCP/3.4.5/HikariCP-3.4.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/mysql/mysql-connector-java/8.0.25/mysql-connector-java-8.0.25.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/typroject/tyboot-core-restful/1.1.20/tyboot-core-restful-1.1.20.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/typroject/tyboot-core-auth/1.1.20/tyboot-core-auth-1.1.20.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/baomidou/mybatis-plus-generator/3.2.0/mybatis-plus-generator-3.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/baomidou/mybatis-plus-extension/3.2.0/mybatis-plus-extension-3.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/baomidou/mybatis-plus-core/3.2.0/mybatis-plus-core-3.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/baomidou/mybatis-plus-annotation/3.2.0/mybatis-plus-annotation-3.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mybatis/mybatis/3.5.2/mybatis-3.5.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/baomidou/mybatis-plus-boot-starter/3.2.0/mybatis-plus-boot-starter-3.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/baomidou/mybatis-plus/3.2.0/mybatis-plus-3.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-jdbc/2.3.11.RELEASE/spring-boot-starter-jdbc-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-jdbc/5.2.15.RELEASE/spring-jdbc-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mybatis/spring/boot/mybatis-spring-boot-starter/2.1.2/mybatis-spring-boot-starter-2.1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mybatis/spring/boot/mybatis-spring-boot-autoconfigure/2.1.2/mybatis-spring-boot-autoconfigure-2.1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mybatis/mybatis-spring/2.0.4/mybatis-spring-2.0.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/javassist/javassist/3.21.0-GA/javassist-3.21.0-GA.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/cn/afterturn/easypoi-base/4.0.0/easypoi-base-4.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi/4.0.0/poi-4.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-collections4/4.2/commons-collections4-4.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/ognl/ognl/3.2.6/ognl-3.2.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/cn/afterturn/easypoi-web/3.0.3/easypoi-web-3.0.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/cn/afterturn/easypoi-annotation/3.0.3/easypoi-annotation-3.0.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/itextpdf/itextpdf/5.5.13/itextpdf-5.5.13.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/itextpdf/itext-asian/5.2.0/itext-asian-5.2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/zxing/core/3.3.0/core-3.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/pagehelper/pagehelper/5.1.10/pagehelper-5.1.10.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/jsqlparser/jsqlparser/2.0/jsqlparser-2.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/yeejoin/amos-feign-rule/1.7.0/amos-feign-rule-1.7.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-starter-netflix-eureka-server/2.2.5.RELEASE/spring-cloud-starter-netflix-eureka-server-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-starter/2.2.5.RELEASE/spring-cloud-starter-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-context/2.2.5.RELEASE/spring-cloud-context-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-crypto/5.3.9.RELEASE/spring-security-crypto-5.3.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-commons/2.2.5.RELEASE/spring-cloud-commons-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-rsa/1.0.9.RELEASE/spring-security-rsa-1.0.9.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcpkix-jdk15on/1.64/bcpkix-jdk15on-1.64.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcprov-jdk15on/1.64/bcprov-jdk15on-1.64.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-netflix-eureka-server/2.2.5.RELEASE/spring-cloud-netflix-eureka-server-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-actuator/2.3.11.RELEASE/spring-boot-starter-actuator-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-actuator-autoconfigure/2.3.11.RELEASE/spring-boot-actuator-autoconfigure-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-actuator/2.3.11.RELEASE/spring-boot-actuator-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/micrometer/micrometer-core/1.5.14/micrometer-core-1.5.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/latencyutils/LatencyUtils/2.0.3/LatencyUtils-2.0.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-freemarker/2.3.11.RELEASE/spring-boot-starter-freemarker-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-context-support/5.2.15.RELEASE/spring-context-support-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-netflix-hystrix/2.2.5.RELEASE/spring-cloud-netflix-hystrix-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-netflix-eureka-client/2.2.5.RELEASE/spring-cloud-netflix-eureka-client-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/eureka/eureka-client/1.9.25/eureka-client-1.9.25.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/jettison/jettison/1.3.7/jettison-1.3.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/netflix-commons/netflix-eventbus/0.3.0/netflix-eventbus-0.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/netflix-commons/netflix-infix/0.3.0/netflix-infix-0.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-jxpath/commons-jxpath/1.3/commons-jxpath-1.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/antlr/antlr-runtime/3.4/antlr-runtime-3.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/antlr/stringtemplate/3.2.1/stringtemplate-3.2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/antlr/antlr/2.7.7/antlr-2.7.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-math/2.2/commons-math-2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/ws/rs/jsr311-api/1.1.1/jsr311-api-1.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/servo/servo-core/0.12.21/servo-core-0.12.21.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/jersey/jersey-core/1.19.1/jersey-core-1.19.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/jersey/contribs/jersey-apache-client4/1.19.1/jersey-apache-client4-1.19.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpcore/4.4.14/httpcore-4.4.14.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/inject/guice/4.1.0/guice-4.1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/jersey/jersey-servlet/1.19.1/jersey-servlet-1.19.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/jersey/jersey-server/1.19.1/jersey-server-1.19.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/jersey/jersey-client/1.19.1/jersey-client-1.19.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/eureka/eureka-core/1.9.25/eureka-core-1.9.25.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/archaius/archaius-core/0.7.6/archaius-core-0.7.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/findbugs/jsr305/3.0.1/jsr305-3.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/javax/inject/javax.inject/1/javax.inject-1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/dataformat/jackson-dataformat-xml/2.11.4/jackson-dataformat-xml-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.11.4/jackson-module-jaxb-annotations-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/activation/jakarta.activation-api/1.2.2/jakarta.activation-api-1.2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/woodstox/stax2-api/4.2.1/stax2-api-4.2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/thoughtworks/xstream/xstream/1.4.11.1/xstream-1.4.11.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-starter-netflix-archaius/2.2.5.RELEASE/spring-cloud-starter-netflix-archaius-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-netflix-ribbon/2.2.5.RELEASE/spring-cloud-netflix-ribbon-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-netflix-archaius/2.2.5.RELEASE/spring-cloud-netflix-archaius-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-configuration/commons-configuration/1.8/commons-configuration-1.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-starter-netflix-ribbon/2.2.5.RELEASE/spring-cloud-starter-netflix-ribbon-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/ribbon/ribbon/2.3.0/ribbon-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/ribbon/ribbon-transport/2.3.0/ribbon-transport-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/reactivex/rxnetty-contexts/0.4.9/rxnetty-contexts-0.4.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/reactivex/rxnetty-servo/0.4.9/rxnetty-servo-0.4.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/reactivex/rxnetty/0.4.9/rxnetty-0.4.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/ribbon/ribbon-core/2.3.0/ribbon-core-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/ribbon/ribbon-httpclient/2.3.0/ribbon-httpclient-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/netflix-commons/netflix-commons-util/0.3.0/netflix-commons-util-0.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/ribbon/ribbon-loadbalancer/2.3.0/ribbon-loadbalancer-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/netflix-commons/netflix-statistics/0.1.1/netflix-statistics-0.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/reactivex/rxjava/1.3.8/rxjava-1.3.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-starter-loadbalancer/2.2.5.RELEASE/spring-cloud-starter-loadbalancer-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/cloud/spring-cloud-loadbalancer/2.2.5.RELEASE/spring-cloud-loadbalancer-2.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-validation/2.3.11.RELEASE/spring-boot-starter-validation-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hibernate/validator/hibernate-validator/6.1.7.Final/hibernate-validator-6.1.7.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/validation/jakarta.validation-api/2.0.2/jakarta.validation-api-2.0.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/jboss/logging/jboss-logging/3.4.1.Final/jboss-logging-3.4.1.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/projectreactor/addons/reactor-extra/3.3.6.RELEASE/reactor-extra-3.3.6.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-cache/2.3.11.RELEASE/spring-boot-starter-cache-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/stoyanr/evictor/1.0.0/evictor-1.0.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/ribbon/ribbon-eureka/2.3.0/ribbon-eureka-2.3.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/glassfish/jaxb/jaxb-runtime/2.3.4/jaxb-runtime-2.3.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/jakarta/xml/bind/jakarta.xml.bind-api/2.3.3/jakarta.xml.bind-api-2.3.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/glassfish/jaxb/txw2/2.3.4/txw2-2.3.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/istack/istack-commons-runtime/3.0.12/istack-commons-runtime-3.0.12.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/sun/activation/jakarta.activation/1.2.2/jakarta.activation-1.2.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-web/2.3.11.RELEASE/spring-boot-starter-web-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-json/2.3.11.RELEASE/spring-boot-starter-json-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.11.4/jackson-datatype-jdk8-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.11.4/jackson-datatype-jsr310-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/module/jackson-module-parameter-names/2.11.4/jackson-module-parameter-names-2.11.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-tomcat/2.3.11.RELEASE/spring-boot-starter-tomcat-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-core/9.0.46/tomcat-embed-core-9.0.46.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/glassfish/jakarta.el/3.0.3/jakarta.el-3.0.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.46/tomcat-embed-websocket-9.0.46.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-web/5.2.15.RELEASE/spring-web-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-beans/5.2.15.RELEASE/spring-beans-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-webmvc/5.2.15.RELEASE/spring-webmvc-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-context/5.2.15.RELEASE/spring-context-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-expression/5.2.15.RELEASE/spring-expression-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/hystrix/hystrix-javanica/1.5.18/hystrix-javanica-1.5.18.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm/5.0.4/asm-5.0.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/netflix/hystrix/hystrix-core/1.5.18/hystrix-core-1.5.18.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/hdrhistogram/HdrHistogram/2.1.9/HdrHistogram-2.1.9.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/aspectj/aspectjweaver/1.9.6/aspectjweaver-1.9.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/guava/29.0-jre/guava-29.0-jre.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/checkerframework/checker-qual/2.11.1/checker-qual-2.11.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_annotations/2.3.4/error_prone_annotations-2.3.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/alibaba/fastjson/1.2.83/fastjson-1.2.83.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/yeejoin/amos-feign-privilege/1.7.8/amos-feign-privilege-1.7.8.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/alibaba/easyexcel/2.0.5/easyexcel-2.0.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/cglib/cglib/3.1/cglib-3.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ehcache/ehcache/3.8.1/ehcache-3.8.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-compress/1.18/commons-compress-1.18.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi-scratchpad/4.0.1/poi-scratchpad-4.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi-ooxml/4.0.1/poi-ooxml-4.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/virtuald/curvesapi/1.05/curvesapi-1.05.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/fr/opensagres/xdocreport/xdocreport/1.0.6/xdocreport-1.0.6.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/poi-ooxml-schemas/4.0.1/poi-ooxml-schemas-4.0.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/xmlbeans/xmlbeans/3.0.2/xmlbeans-3.0.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/poi/ooxml-schemas/1.3/ooxml-schemas-1.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/jsoup/jsoup/1.11.3/jsoup-1.11.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/joda-time/joda-time/2.10.4/joda-time-2.10.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-lang3/3.10/commons-lang3-3.10.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/velocity/velocity-engine-core/2.1/velocity-engine-core-2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/freemarker/freemarker/2.3.31/freemarker-2.3.31.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/boot/spring-boot-starter-websocket/2.3.11.RELEASE/spring-boot-starter-websocket-2.3.11.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-messaging/5.2.15.RELEASE/spring-messaging-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-websocket/5.2.15.RELEASE/spring-websocket-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-jexl/2.1.1/commons-jexl-2.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/integration/spring-integration-stream/5.3.7.RELEASE/spring-integration-stream-5.3.7.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/integration/spring-integration-core/5.3.7.RELEASE/spring-integration-core-5.3.7.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-tx/5.2.15.RELEASE/spring-tx-5.2.15.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/retry/spring-retry/1.2.5.RELEASE/spring-retry-1.2.5.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/projectreactor/reactor-core/3.3.17.RELEASE/reactor-core-3.3.17.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/reactivestreams/reactive-streams/1.0.3/reactive-streams-1.0.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/integration/spring-integration-mqtt/5.3.7.RELEASE/spring-integration-mqtt-5.3.7.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/eclipse/paho/org.eclipse.paho.client.mqttv3/1.2.4/org.eclipse.paho.client.mqttv3-1.2.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/projectlombok/lombok/1.18.20/lombok-1.18.20.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/xiaoymin/knife4j-spring-boot-starter/2.0.7/knife4j-spring-boot-starter-2.0.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/xiaoymin/knife4j-spring-boot-autoconfigure/2.0.7/knife4j-spring-boot-autoconfigure-2.0.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/xiaoymin/knife4j-spring/2.0.7/knife4j-spring-2.0.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/xiaoymin/knife4j-annotations/2.0.7/knife4j-annotations-2.0.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/xiaoymin/knife4j-core/2.0.7/knife4j-core-2.0.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/swagger/swagger-models/1.5.22/swagger-models-1.5.22.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-swagger2/2.10.5/springfox-swagger2-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-spi/2.10.5/springfox-spi-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-core/2.10.5/springfox-core-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/net/bytebuddy/byte-buddy/1.10.22/byte-buddy-1.10.22.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-schema/2.10.5/springfox-schema-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-swagger-common/2.10.5/springfox-swagger-common-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-spring-web/2.10.5/springfox-spring-web-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/github/classgraph/classgraph/4.1.7/classgraph-4.1.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/classmate/1.5.1/classmate-1.5.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/plugin/spring-plugin-core/2.0.0.RELEASE/spring-plugin-core-2.0.0.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/plugin/spring-plugin-metadata/2.0.0.RELEASE/spring-plugin-metadata-2.0.0.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/mapstruct/mapstruct/1.3.1.Final/mapstruct-1.3.1.Final.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-bean-validators/2.10.5/springfox-bean-validators-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/springfox/springfox-spring-webmvc/2.10.5/springfox-spring-webmvc-2.10.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/github/xiaoymin/knife4j-spring-ui/2.0.7/knife4j-spring-ui-2.0.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/io/swagger/swagger-annotations/1.5.13/swagger-annotations-1.5.13.jar" enabled="true" runInBatchMode="false"/>
</factorypath>
amos-boot-module/amos-boot-module-biz/amos-boot-module-file-biz/pom.xml
0 → 100644
View file @
9ac42835
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-boot-module-biz
</artifactId>
<version>
1.0.0
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
amos-boot-module-file-biz
</artifactId>
<dependencies>
<dependency>
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-boot-module-file-api
</artifactId>
<version>
${amos-biz-boot.version}
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/pom.xml
View file @
9ac42835
...
...
@@ -61,5 +61,6 @@
<module>
amos-boot-module-ccs-biz
</module>
<module>
amos-boot-module-avic-biz
</module>
<module>
amos-boot-module-kgd-biz
</module>
<module>
amos-boot-module-file-biz
</module>
</modules>
</project>
\ No newline at end of file
amos-boot-system-file/pom.xml
0 → 100644
View file @
9ac42835
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-biz-boot
</artifactId>
<version>
1.0.0
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
amos-boot-system-file
</artifactId>
<dependencies>
<dependency>
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-boot-module-file-biz
</artifactId>
<version>
${amos-biz-boot.version}
</version>
</dependency>
<dependency>
<groupId>
org.liquibase
</groupId>
<artifactId>
liquibase-core
</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
amos-boot-system-file/src/main/java/com/yeejoin/amos/AmoFileApplication.java
0 → 100644
View file @
9ac42835
package
com
.
yeejoin
.
amos
;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.core.env.Environment
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler
;
import
com.yeejoin.amos.boot.biz.common.utils.oConvertUtils
;
/**
* <pre>
* 服务启动类
* </pre>
*/
@SpringBootApplication
@EnableTransactionManagement
@EnableConfigurationProperties
@EnableDiscoveryClient
@EnableFeignClients
(
basePackages
=
{
"com.yeejoin"
})
@EnableAsync
@MapperScan
({
"org.typroject.tyboot.demo.face.orm.dao*"
,
"org.typroject.tyboot.face.*.orm.dao*"
,
"org.typroject.tyboot.core.auth.face.orm.dao*"
,
"org.typroject.tyboot.component.*.face.orm.dao*"
,
"com.yeejoin.amos.boot.module.*.api.mapper"
,
"com.yeejoin.amos.boot.biz.common.dao.mapper"
,
"com.yeejoin.amos.file.face.orm.dao*"
})
@ComponentScan
(
basePackages
=
{
"org.typroject"
,
"com.yeejoin"
})
public
class
AmoFileApplication
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AmoFileApplication
.
class
);
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
{
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
AmoFileApplication
.
class
,
args
);
Environment
env
=
context
.
getEnvironment
();
String
ip
=
InetAddress
.
getLocalHost
().
getHostAddress
();
String
port
=
env
.
getProperty
(
"server.port"
);
String
path
=
oConvertUtils
.
getString
(
env
.
getProperty
(
"server.servlet.context-path"
));
GlobalExceptionHandler
.
setAlwaysOk
(
true
);
logger
.
info
(
"\n----------------------------------------------------------\n\t"
+
"Application Amos-Biz-Boot is running! Access URLs:\n\t"
+
"Swagger文档: \thttp://"
+
ip
+
":"
+
port
+
path
+
"/doc.html\n"
+
"----------------------------------------------------------"
);
}
}
amos-boot-system-file/src/main/resources/application-dev.properties
0 → 100644
View file @
9ac42835
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.datasource.url
=
jdbc:mysql://172.16.3.18:3306/book?useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
spring.datasource.username
=
root
spring.datasource.password
=
Yeejoin@2020
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.pool-name
=
DatebookHikariCP
spring.datasource.hikari.minimum-idle
=
3
spring.datasource.hikari.maximum-pool-size
=
30
spring.datasource.hikari.auto-commit
=
true
spring.datasource.hikari.idle-timeout
=
500000
spring.datasource.hikari.max-lifetime
=
1800000
spring.datasource.hikari.connection-timeout
=
60000
spring.datasource.hikari.connection-test-query
=
SELECT 1
eureka.instance.hostname
=
172.16.3.18
eureka.instance.prefer-ip-address
=
true
eureka.client.serviceUrl.defaultZone
:
http://admin:a1234560@${eureka.instance.hostname}:10001/eureka/
#redis
spring.redis.database
=
1
spring.redis.host
=
172.16.3.18
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
spring.redis.lettuce.pool.max-active
=
200
spring.redis.lettuce.pool.max-wait
=
-1
spring.redis.lettuce.pool.max-idle
=
10
spring.redis.lettuce.pool.min-idle
=
0
spring.redis.expire.time
=
300
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://172.16.3.18:2883
emqx.user-name
=
super
emqx.password
=
a123456
spring.security.user.name
=
admin
spring.security.user.password
=
a1234560
spring.boot.admin.client.enabled
=
true
spring.boot.admin.client.instance.metadata.user.name
=
${spring.security.user.name}
spring.boot.admin.client.instance.metadata.user.password
=
${spring.security.user.password}
spring.boot.admin.client.username
=
admin
spring.boot.admin.client.password
=
a1234560
management.security.enabled
=
false
management.endpoint.health.show-details
=
always
management.endpoints.web.exposure.include
=
*
amos-boot-system-file/src/main/resources/application.properties
0 → 100644
View file @
9ac42835
spring.application.name
=
AMOS-BIZ-FILE-API
server.servlet.context-path
=
/file
server.port
=
8808
server.uri-encoding
=
UTF-8
spring.profiles.active
=
dev
spring.jackson.time-zone
=
GMT+8
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
logging.config
=
classpath:logback-${spring.profiles.active}.xml
## mybatis-plus配置控制台打印完整带参数SQL语句
mybatis-plus.configuration.log-impl
=
org.apache.ibatis.logging.stdout.StdOutImpl
## DB properties:
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.minimum-idle
=
10
spring.datasource.hikari.maximum-pool-size
=
25
spring.datasource.hikari.auto-commit
=
true
spring.datasource.hikari.idle-timeout
=
30000
spring.datasource.hikari.pool-name
=
DatebookHikariCP
spring.datasource.hikari.max-lifetime
=
120000
spring.datasource.hikari.connection-timeout
=
30000
spring.datasource.hikari.connection-test-query
=
SELECT 1
##liquibase
spring.liquibase.change-log
=
classpath:/db/changelog/changelog-master.xml
spring.liquibase.enabled
=
true
## eureka properties:
eureka.client.registry-fetch-interval-seconds
=
5
eureka.instance.prefer-ip-address
=
true
management.endpoint.health.show-details
=
always
management.endpoints.web.exposure.include
=
*
eureka.instance.health-check-url-path
=
/actuator/health
eureka.instance.lease-expiration-duration-in-seconds
=
10
eureka.instance.lease-renewal-interval-in-seconds
=
5
eureka.instance.metadata-map.management.context-path
=
${server.servlet.context-path}/actuator
eureka.instance.status-page-url-path
=
/actuator/info
eureka.instance.metadata-map.management.api-docs
=
http://localhost:${server.port}${server.servlet.context-path}/doc.html
## redis properties:
spring.redis.lettuce.pool.max-active
=
200
spring.redis.lettuce.pool.max-wait
=
-1
spring.redis.lettuce.pool.max-idle
=
10
spring.redis.lettuce.pool.min-idle
=
0
## redis失效时间
redis.cache.failure.time
=
10800
spring.servlet.multipart.maxFileSize
=
100MB
spring.servlet.multipart.maxRequestSize
=
100MB
spring.main.allow-bean-definition-overriding
=
true
spring.http.encoding.charset
=
utf-8
spring.http.encoding.enabled
=
true
spring.http.encoding.force
=
true
\ No newline at end of file
amos-boot-system-file/src/main/resources/db/changelog/changelog-master.xml
0 → 100644
View file @
9ac42835
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"
>
</databaseChangeLog>
amos-boot-system-file/src/main/resources/logback-dev.xml
0 → 100644
View file @
9ac42835
<?xml version="1.0" encoding="UTF-8"?>
<configuration
debug=
"false"
>
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property
name=
"LOG_HOME"
value=
"log"
/>
<property
name=
"LOG_PATTERN"
value=
"%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %-50.50logger{50} - %msg [%file:%line] %n"
/>
<!-- 按照每天生成日志文件 -->
<appender
name=
"FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!--日志文件输出的文件名-->
<FileNamePattern>
${LOG_HOME}/ccs.log.%d{yyyy-MM-dd}.log
</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>
7
</MaxHistory>
</rollingPolicy>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>
${LOG_PATTERN}
</pattern>
</encoder>
<!--日志文件最大的大小-->
<triggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"
>
<MaxFileSize>
30mb
</MaxFileSize>
</triggeringPolicy>
</appender>
<!-- 控制台输出 -->
<appender
name=
"STDOUT"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>
${LOG_PATTERN}
</pattern>
</encoder>
</appender>
<!--myibatis log configure-->
<logger
name=
"com.apache.ibatis"
level=
"DEBUG"
/>
<logger
name=
"java.sql.Connection"
level=
"DEBUG"
/>
<logger
name=
"java.sql.Statement"
level=
"DEBUG"
/>
<logger
name=
"java.sql.PreparedStatement"
level=
"DEBUG"
/>
<logger
name=
"com.baomidou.mybatisplus"
level=
"DEBUG"
/>
<logger
name=
"org.springframework"
level=
"DEBUG"
/>
<logger
name=
"org.typroject"
level=
"DEBUG"
/>
<logger
name=
"com.yeejoin"
level=
"DEBUG"
/>
<!-- 日志输出级别 -->
<root
level=
"INFO"
>
<appender-ref
ref=
"FILE"
/>
<appender-ref
ref=
"STDOUT"
/>
</root>
</configuration>
pom.xml
View file @
9ac42835
...
...
@@ -318,7 +318,7 @@
<modules>
<module>
amos-boot-module
</module>
<module>
amos-boot-biz-common
</module>
<module>
amos-boot-system-tzs
</module>
<module>
amos-boot-system-tzs
</module>
<module>
amos-boot-system-jcs
</module>
<module>
amos-boot-system-knowledgebase
</module>
<module>
amos-boot-system-fas
</module>
...
...
@@ -336,5 +336,6 @@
<module>
amos-boot-system-ugp
</module>
<module>
amos-boot-system-tdc
</module>
<module>
amos-boot-system-kgd
</module>
<module>
amos-boot-system-file
</module>
</modules>
</project>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment