change data folder
This commit is contained in:
parent
ef88445d6c
commit
9c4eb562d4
|
@ -14,10 +14,6 @@ i
|
|||
README.md,8\e\8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d
|
||||
7
|
||||
pom.xml,4\4\442292b8a7efeabbe4cc176709b833b1792140ec
|
||||
_
|
||||
/src/main/java/cnkj/site/data/ProtobufOuter.java,5\a\5ac75731bc924d16ee247ba33055686cd1152925
|
||||
h
|
||||
8src/main/java/cnkj/site/data/ProtobufOuterOperation.java,b\a\ba55f3bf65bd51e1ae3ef25ad210a0f09762aa03
|
||||
k
|
||||
;src/main/java/site/cnkj/common/config/AsyncExecutePool.java,4\1\416390ba57649e9f4e6365934e9a6827cca3ffed
|
||||
p
|
||||
|
@ -81,4 +77,8 @@ Asrc/main/java/site/cnkj/common/utils/serialize/UrlDecodeUtil.java,1\4\14399913
|
|||
q
|
||||
Asrc/main/java/site/cnkj/common/utils/system/GracefulShutdown.java,f\d\fdadf7a612307c5bb8e90739949b439a1891d886
|
||||
h
|
||||
8src/main/java/site/cnkj/common/utils/data/RedisUtil.java,e\0\e00232faab93cb27b9940f780c75123903d70b1c
|
||||
8src/main/java/site/cnkj/common/utils/data/RedisUtil.java,e\0\e00232faab93cb27b9940f780c75123903d70b1c
|
||||
_
|
||||
/src/main/java/site/cnkj/data/ProtobufOuter.java,9\f\9f5f569cdcb2cd35235adfef521ccd334b295f84
|
||||
h
|
||||
8src/main/java/site/cnkj/data/ProtobufOuterOperation.java,b\2\b28def072d697c755d8047d7c4fc36e92d284e43
|
|
@ -1,7 +1,44 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="52b7c556-aac6-402c-b840-5f2564f1f5d7" name="Default" comment="" />
|
||||
<list default="true" id="52b7c556-aac6-402c-b840-5f2564f1f5d7" name="Default" comment="change data folder">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/sonarlint/issuestore/index.pb" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/sonarlint/issuestore/index.pb" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/config/AsyncExecutePool.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/config/AsyncExecutePool.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/config/AsyncThreadPoolConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/config/AsyncThreadPoolConfig.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/config/ElasticsearchClientConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/config/ElasticsearchClientConfig.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/config/MongodbConfig.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/config/RedisConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/config/RedisConfig.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/config/RestTemplateConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/config/RestTemplateConfig.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/object/ReasonEnumeration.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/object/ReasonEnumeration.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/object/redis/Receiver.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/object/redis/Receiver.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/object/servlet/BaseResult.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/object/servlet/BaseResult.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/object/servlet/CommonInfo.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/object/servlet/CommonInfo.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/object/servlet/DataResult.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/object/servlet/DataResult.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/object/servlet/ResponseBodyCode.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/object/servlet/ResponseBodyCode.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/service/ActuatorInfo.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/service/ActuatorInfo.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/data/KafkaUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/data/KafkaUtil.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/data/MongoClientsInit.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/data/MongoClientsInit.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/data/MongodbUtil.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/data/RedisUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/data/RedisUtil.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/date/DateUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/date/DateUtil.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/file/FileEncryptDecrypt.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/file/FileEncryptDecrypt.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/file/FileUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/file/FileUtil.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/http/HttpCommonUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/http/HttpCommonUtil.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/http/RestTemplateUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/http/RestTemplateUtil.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/http/SSH2Util.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/io/CopyUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/io/CopyUtil.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/io/DES.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/io/DES.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/io/RSAEncrypt.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/io/RSAEncrypt.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/io/StringUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/io/StringUtil.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/logger/LoggerUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/logger/LoggerUtil.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/serialize/JacksonUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/serialize/JacksonUtil.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/serialize/SoapXmlFormatUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/serialize/SoapXmlFormatUtil.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/serialize/UrlDecodeUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/serialize/UrlDecodeUtil.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/system/GracefulShutdown.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/system/GracefulShutdown.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/test/java/site/cnkj/utils/CommonApplicationTests.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/site/cnkj/utils/CommonApplicationTests.java" afterDir="false" />
|
||||
</list>
|
||||
<ignored path="$PROJECT_DIR$/target/" />
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="TRACKING_ENABLED" value="true" />
|
||||
|
@ -12,27 +49,25 @@
|
|||
</component>
|
||||
<component name="FileEditorManager">
|
||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||
<file leaf-file-name="pom.xml" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/pom.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="295">
|
||||
<caret line="15" column="46" selection-start-line="15" selection-start-column="46" selection-end-line="15" selection-end-column="46" />
|
||||
<folding>
|
||||
<element signature="n#build#0;n#project#0;n#!!top" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
<provider editor-type-id="MavenHelperPluginDependencyAnalyzer" />
|
||||
<file leaf-file-name="RSAEncrypt.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/io/RSAEncrypt.java">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="CommonApplicationTests.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/test/java/site/cnkj/utils/CommonApplicationTests.java">
|
||||
<file leaf-file-name="RestTemplateConfig.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/config/RestTemplateConfig.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="120">
|
||||
<caret line="6" lean-forward="true" selection-start-line="6" selection-end-line="6" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
<state relative-caret-position="1220">
|
||||
<caret line="77" column="19" selection-start-line="77" selection-start-column="19" selection-end-line="77" selection-end-column="19" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="LoggerUtil.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/logger/LoggerUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="5880">
|
||||
<caret line="306" column="36" selection-start-line="306" selection-start-column="36" selection-end-line="306" selection-end-column="36" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -40,80 +75,50 @@
|
|||
<file leaf-file-name="SoapXmlFormatUtil.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/serialize/SoapXmlFormatUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1720">
|
||||
<state relative-caret-position="1560">
|
||||
<caret line="86" column="8" selection-start-line="86" selection-start-column="8" selection-end-line="86" selection-end-column="8" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="DataResult.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/object/servlet/DataResult.java">
|
||||
<file leaf-file-name="ActuatorInfo.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/service/ActuatorInfo.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="140">
|
||||
<caret line="8" selection-start-line="8" selection-end-line="8" />
|
||||
<state relative-caret-position="260">
|
||||
<caret line="24" column="22" selection-start-line="24" selection-start-column="22" selection-end-line="24" selection-end-column="22" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="HttpCommonUtil.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/http/HttpCommonUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="AsyncExecutePool.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/config/AsyncExecutePool.java">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="AsyncThreadPoolConfig.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/config/AsyncThreadPoolConfig.java">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="RestTemplateUtil.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/http/RestTemplateUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="196">
|
||||
<caret line="36" column="40" selection-start-line="36" selection-start-column="40" selection-end-line="36" selection-end-column="40" />
|
||||
<state relative-caret-position="140">
|
||||
<caret line="14" column="12" selection-start-line="14" selection-start-column="12" selection-end-line="14" selection-end-column="12" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="RedisUtil.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/data/RedisUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="README.md" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/README.md">
|
||||
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
||||
<state split_layout="SPLIT">
|
||||
<first_editor relative-caret-position="120">
|
||||
<caret line="6" column="54" selection-start-line="6" selection-start-column="54" selection-end-line="6" selection-end-column="54" />
|
||||
</first_editor>
|
||||
<second_editor />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="RedisConfig.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/config/RedisConfig.java">
|
||||
<file leaf-file-name="FileEncryptDecrypt.java" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/file/FileEncryptDecrypt.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="231">
|
||||
<caret line="91" column="49" selection-start-line="91" selection-start-column="49" selection-end-line="91" selection-end-column="49" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#3878#3879#0" expanded="true" />
|
||||
<element signature="e#3949#3950#0" expanded="true" />
|
||||
<element signature="e#4064#4065#0" expanded="true" />
|
||||
<element signature="e#4136#4137#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="Receiver.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/object/redis/Receiver.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="100">
|
||||
<caret line="5" column="17" selection-start-line="5" selection-start-column="17" selection-end-line="5" selection-end-column="17" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="ElasticsearchClientConfig.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/config/ElasticsearchClientConfig.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="309">
|
||||
<caret line="105" column="50" selection-start-line="105" selection-start-column="50" selection-end-line="105" selection-end-column="50" />
|
||||
<state relative-caret-position="420">
|
||||
<caret line="70" column="44" lean-forward="true" selection-start-line="70" selection-start-column="44" selection-end-line="70" selection-end-column="44" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -172,9 +177,11 @@
|
|||
<option value="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/data/KafkaUtil.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/file/FileUtil.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/logger/LoggerUtil.java" />
|
||||
<option value="$PROJECT_DIR$/README.md" />
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/src/test/java/site/cnkj/utils/CommonApplicationTests.java" />
|
||||
<option value="$PROJECT_DIR$/README.md" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/http/RestTemplateUtil.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/file/FileEncryptDecrypt.java" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
|
@ -218,9 +225,9 @@
|
|||
<packageJsonPaths />
|
||||
</component>
|
||||
<component name="ProjectFrameBounds" extendedState="6">
|
||||
<option name="x" value="168" />
|
||||
<option name="y" value="25" />
|
||||
<option name="width" value="1693" />
|
||||
<option name="x" value="-8" />
|
||||
<option name="y" value="-8" />
|
||||
<option name="width" value="1936" />
|
||||
<option name="height" value="1056" />
|
||||
</component>
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true">
|
||||
|
@ -232,7 +239,6 @@
|
|||
</navigator>
|
||||
<panes>
|
||||
<pane id="PackagesPane" />
|
||||
<pane id="Scope" />
|
||||
<pane id="AndroidView" />
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
|
@ -265,6 +271,88 @@
|
|||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="cnkj" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="CommonUtil" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="CommonUtil" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="cnkj" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="common" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="CommonUtil" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="CommonUtil" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="cnkj" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="common" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="config" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="CommonUtil" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="CommonUtil" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="cnkj" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="common" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="object" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="CommonUtil" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="CommonUtil" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="cnkj" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="common" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="object" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="redis" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="CommonUtil" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="CommonUtil" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="cnkj" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="common" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="object" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="servlet" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="CommonUtil" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="CommonUtil" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="cnkj" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="common" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="service" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="CommonUtil" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="CommonUtil" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="cnkj" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="common" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="utils" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="CommonUtil" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="CommonUtil" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="cnkj" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="common" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="utils" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="data" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
|
@ -273,7 +361,10 @@
|
|||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="cnkj" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="common" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="utils" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="date" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="CommonUtil" type="b2602c69:ProjectViewProjectNode" />
|
||||
|
@ -281,8 +372,74 @@
|
|||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="cnkj" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="common" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="config" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="utils" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="file" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="CommonUtil" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="CommonUtil" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="cnkj" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="common" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="utils" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="http" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="CommonUtil" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="CommonUtil" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="cnkj" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="common" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="utils" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="io" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="CommonUtil" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="CommonUtil" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="cnkj" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="common" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="utils" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="logger" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="CommonUtil" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="CommonUtil" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="cnkj" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="common" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="utils" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="serialize" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="CommonUtil" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="CommonUtil" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="cnkj" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="common" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="utils" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="system" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="CommonUtil" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="CommonUtil" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="cnkj" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="data" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="CommonUtil" type="b2602c69:ProjectViewProjectNode" />
|
||||
|
@ -309,6 +466,7 @@
|
|||
<select />
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="Scope" />
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
|
@ -339,15 +497,16 @@
|
|||
<property name="settings.editor.selected.configurable" value="fileTemplates" />
|
||||
</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="CopyFile.RECENT_KEYS">
|
||||
<recent name="F:\mine\CommonUtil\src\main\java" />
|
||||
<recent name="F:\CommonUtil\repository\site\cnkj\CommonUtil" />
|
||||
<recent name="F:\CommonUtil\maven" />
|
||||
</key>
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="F:\CommonUtil\repository\site\cnkj\CommonUtil\1.1.0" />
|
||||
<recent name="F:\CommonUtil\repository\site\cnkj\CommonUtil" />
|
||||
</key>
|
||||
<key name="CopyFile.RECENT_KEYS">
|
||||
<recent name="F:\mine\CommonUtil\src\main\java\site\cnkj\common" />
|
||||
<recent name="F:\mine\CommonUtil\src\main\java" />
|
||||
<recent name="F:\CommonUtil\repository\site\cnkj\CommonUtil" />
|
||||
<recent name="F:\CommonUtil\maven" />
|
||||
</key>
|
||||
</component>
|
||||
<component name="RunDashboard">
|
||||
<option name="ruleStates">
|
||||
|
@ -361,7 +520,18 @@
|
|||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="RunManager" selected="Application.KafkaUtil">
|
||||
<component name="RunManager" selected="Application.CommonApplicationTests">
|
||||
<configuration name="CommonApplicationTests" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
||||
<option name="MAIN_CLASS_NAME" value="site.cnkj.utils.CommonApplicationTests" />
|
||||
<module name="CommonUtil" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="site.cnkj.utils.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
</configuration>
|
||||
<configuration name="HttpCommonUtil" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
||||
<option name="MAIN_CLASS_NAME" value="site.cnkj.utils.HttpCommonUtil" />
|
||||
<module name="CommonUtil" />
|
||||
|
@ -440,9 +610,11 @@
|
|||
<item itemvalue="Application.HttpCommonUtil" />
|
||||
<item itemvalue="Application.KafkaUtil" />
|
||||
<item itemvalue="Application.SSH2Util" />
|
||||
<item itemvalue="Application.CommonApplicationTests" />
|
||||
</list>
|
||||
<recent_temporary>
|
||||
<list>
|
||||
<item itemvalue="Application.CommonApplicationTests" />
|
||||
<item itemvalue="Application.KafkaUtil" />
|
||||
<item itemvalue="Application.SSH2Util" />
|
||||
<item itemvalue="Application.HttpCommonUtil" />
|
||||
|
@ -475,6 +647,9 @@
|
|||
<workItem from="1597628550773" duration="1330000" />
|
||||
<workItem from="1612775343578" duration="692000" />
|
||||
<workItem from="1612838922198" duration="1250000" />
|
||||
<workItem from="1615280802811" duration="2696000" />
|
||||
<workItem from="1615862401748" duration="5071000" />
|
||||
<workItem from="1616492699296" duration="761000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="repair some lombok questions">
|
||||
<created>1574320188766</created>
|
||||
|
@ -651,11 +826,18 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1612840186807</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="26" />
|
||||
<task id="LOCAL-00026" summary="change data folder">
|
||||
<created>1615280926031</created>
|
||||
<option name="number" value="00026" />
|
||||
<option name="presentableId" value="LOCAL-00026" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1615280926031</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="27" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="totallyTimeSpent" value="84108000" />
|
||||
<option name="totallyTimeSpent" value="92636000" />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
|
||||
|
@ -675,21 +857,21 @@
|
|||
<window_info id="UI Designer" order="2" />
|
||||
<window_info anchor="bottom" id="Debug" order="3" weight="0.3991276" />
|
||||
<window_info anchor="bottom" id="TODO" order="6" />
|
||||
<window_info anchor="bottom" id="Messages" order="7" weight="0.3293348" />
|
||||
<window_info anchor="right" id="Palette	" order="3" />
|
||||
<window_info id="Image Layers" order="2" />
|
||||
<window_info anchor="bottom" id="Java Enterprise" order="7" />
|
||||
<window_info anchor="right" id="Capture Analysis" order="3" />
|
||||
<window_info active="true" anchor="bottom" id="Version Control" order="7" visible="true" weight="0.32606325" />
|
||||
<window_info anchor="bottom" id="Version Control" order="7" weight="0.32606325" />
|
||||
<window_info anchor="bottom" id="Run" order="2" weight="0.3642312" />
|
||||
<window_info anchor="bottom" id="Spring" order="7" />
|
||||
<window_info anchor="bottom" id="Terminal" order="7" weight="0.3293348" />
|
||||
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.19989339" />
|
||||
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.20628998" />
|
||||
<window_info id="Web" order="2" side_tool="true" />
|
||||
<window_info anchor="bottom" id="SonarLint" order="7" weight="0.3293348" />
|
||||
<window_info active="true" anchor="bottom" id="SonarLint" order="7" visible="true" weight="0.3293348" />
|
||||
<window_info anchor="right" id="Theme Preview" order="3" />
|
||||
<window_info id="Favorites" order="2" side_tool="true" />
|
||||
<window_info anchor="right" id="Bean Validation" order="3" />
|
||||
<window_info anchor="bottom" id="Messages" order="7" weight="0.3293348" />
|
||||
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
||||
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
|
||||
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
||||
|
@ -786,7 +968,8 @@
|
|||
<MESSAGE value="maven" />
|
||||
<MESSAGE value="new class for multi mongo-client" />
|
||||
<MESSAGE value="change folder and fix some bug" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="change folder and fix some bug" />
|
||||
<MESSAGE value="change data folder" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="change data folder" />
|
||||
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="true" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
|
@ -803,57 +986,6 @@
|
|||
</breakpoint-manager>
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="jar://$MAVEN_REPOSITORY$/ch/ethz/ganymed/ganymed-ssh2/262/ganymed-ssh2-262-sources.jar!/ch/ethz/ssh2/SCPInputStream.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="340">
|
||||
<caret line="23" column="11" selection-start-line="23" selection-start-column="11" selection-end-line="23" selection-end-column="11" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="jar://C:/Program Files/Java/jdk1.8.0_171/src.zip!/java/io/File.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="9240">
|
||||
<caret line="497" column="16" selection-start-line="497" selection-start-column="16" selection-end-line="497" selection-end-column="16" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="jar://$MAVEN_REPOSITORY$/ch/ethz/ganymed/ganymed-ssh2/262/ganymed-ssh2-262-sources.jar!/ch/ethz/ssh2/SCPClient.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="3420">
|
||||
<caret line="177" column="27" selection-start-line="177" selection-start-column="27" selection-end-line="177" selection-end-column="27" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="jar://C:/Program Files/Java/jdk1.8.0_171/src.zip!/java/util/Objects.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-120">
|
||||
<caret line="197" column="46" selection-start-line="197" selection-start-column="46" selection-end-line="197" selection-end-column="46" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/utils/service/ActuatorInfo.java" />
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/utils/domain/BaseResult.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="160">
|
||||
<caret line="8" column="13" selection-start-line="8" selection-start-column="13" selection-end-line="8" selection-end-column="13" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/utils/HttpCommonUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="140">
|
||||
<caret line="13" column="13" selection-start-line="13" selection-start-column="13" selection-end-line="13" selection-end-column="13" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/wiki/ElasticSearch.md" />
|
||||
<entry file="jar://$MAVEN_REPOSITORY$/org/apache/kafka/kafka-clients/1.1.1/kafka-clients-1.1.1-sources.jar!/org/apache/kafka/clients/consumer/OffsetAndTimestamp.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="160">
|
||||
<caret line="23" column="19" selection-start-line="23" selection-start-column="19" selection-end-line="23" selection-end-column="19" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="jar://$MAVEN_REPOSITORY$/org/apache/kafka/kafka-clients/1.1.1/kafka-clients-1.1.1-sources.jar!/org/apache/kafka/clients/consumer/internals/Fetcher.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="6360">
|
||||
|
@ -861,13 +993,7 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/utils/KafkaUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="388">
|
||||
<caret line="181" column="20" selection-start-line="181" selection-start-column="20" selection-end-line="181" selection-end-column="20" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/utils/KafkaUtil.java" />
|
||||
<entry file="jar://C:/Program Files/Java/jdk1.8.0_171/src.zip!/java/util/Map.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="245">
|
||||
|
@ -875,13 +1001,7 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/utils/RedisUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="620">
|
||||
<caret line="39" column="29" selection-start-line="39" selection-start-column="29" selection-end-line="39" selection-end-column="29" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/utils/RedisUtil.java" />
|
||||
<entry file="file://$PROJECT_DIR$/repository/site/cnkj/CommonUtil/1.1.0/_remote.repositories" />
|
||||
<entry file="jar://$MAVEN_REPOSITORY$/org/apache/kafka/kafka-clients/1.1.1/kafka-clients-1.1.1-sources.jar!/org/apache/kafka/common/TopicPartition.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
|
@ -902,169 +1022,20 @@
|
|||
<entry file="file://$PROJECT_DIR$/.gitignore">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/cnkj/site/data/ProtobufOuter.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1320">
|
||||
<caret line="66" column="19" selection-start-line="66" selection-start-column="19" selection-end-line="66" selection-end-column="19" />
|
||||
<folding>
|
||||
<element signature="e#0#37264#0" expanded="true" />
|
||||
<element signature="e#2522#2523#0" expanded="true" />
|
||||
<element signature="e#2560#2561#0" expanded="true" />
|
||||
<element signature="e#2595#2596#0" expanded="true" />
|
||||
<element signature="e#2663#2664#0" expanded="true" />
|
||||
<element signature="e#2778#2779#0" expanded="true" />
|
||||
<element signature="e#2827#2828#0" expanded="true" />
|
||||
<element signature="e#7896#7897#0" expanded="true" />
|
||||
<element signature="e#7963#7964#0" expanded="true" />
|
||||
<element signature="e#8469#8470#0" expanded="true" />
|
||||
<element signature="e#8515#8516#0" expanded="true" />
|
||||
<element signature="e#10109#10110#0" expanded="true" />
|
||||
<element signature="e#10145#10146#0" expanded="true" />
|
||||
<element signature="e#17539#17540#0" expanded="true" />
|
||||
<element signature="e#17598#17599#0" expanded="true" />
|
||||
<element signature="e#20418#20419#0" expanded="true" />
|
||||
<element signature="e#20483#20484#0" expanded="true" />
|
||||
<element signature="e#22670#22671#0" expanded="true" />
|
||||
<element signature="e#22732#22733#0" expanded="true" />
|
||||
<element signature="e#25105#25106#0" expanded="true" />
|
||||
<element signature="e#25148#25149#0" expanded="true" />
|
||||
<element signature="e#27129#27130#0" expanded="true" />
|
||||
<element signature="e#27204#27205#0" expanded="true" />
|
||||
<element signature="e#27762#27763#0" expanded="true" />
|
||||
<element signature="e#27816#27817#0" expanded="true" />
|
||||
<element signature="e#30029#30030#0" expanded="true" />
|
||||
<element signature="e#30111#30112#0" expanded="true" />
|
||||
<element signature="e#31356#31357#0" expanded="true" />
|
||||
<element signature="e#31400#31401#0" expanded="true" />
|
||||
<element signature="e#33176#33177#0" expanded="true" />
|
||||
<element signature="e#33223#33224#0" expanded="true" />
|
||||
<element signature="e#33860#33861#0" expanded="true" />
|
||||
<element signature="e#33897#33898#0" expanded="true" />
|
||||
<element signature="e#34005#34006#0" expanded="true" />
|
||||
<element signature="e#34042#34043#0" expanded="true" />
|
||||
<element signature="e#34160#34161#0" expanded="true" />
|
||||
<element signature="e#34207#34208#0" expanded="true" />
|
||||
<element signature="e#34935#34936#0" expanded="true" />
|
||||
<element signature="e#34968#34969#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/utils/MongoClientsInit.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="200">
|
||||
<caret line="20" column="5" selection-start-line="20" selection-start-column="5" selection-end-line="20" selection-end-column="5" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/cnkj/site/data/ProtobufOuterOperation.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="240">
|
||||
<caret line="16" column="13" selection-start-line="16" selection-start-column="13" selection-end-line="16" selection-end-column="13" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/config/AsyncExecutePool.java">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/config/AsyncThreadPoolConfig.java">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/data/MongoClientsInit.java">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/utils/MongoClientsInit.java" />
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/object/servlet/BaseResult.java">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/serialize/UrlDecodeUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/http/HttpCommonUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/utils/StringUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="451">
|
||||
<caret line="111" selection-start-line="111" selection-end-line="111" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/data/MongodbUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="140">
|
||||
<caret line="17" column="13" selection-start-line="17" selection-start-column="13" selection-end-line="17" selection-end-column="13" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/utils/config/ElasticsearchConfig.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-1040">
|
||||
<caret line="32" column="13" selection-start-line="32" selection-start-column="13" selection-end-line="32" selection-end-column="13" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/config/MongodbConfig.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="420">
|
||||
<caret line="21" column="28" selection-start-line="21" selection-start-column="28" selection-end-line="21" selection-end-column="28" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/utils/LoggerUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="360">
|
||||
<caret line="23" column="31" lean-forward="true" selection-start-line="23" selection-start-column="31" selection-end-line="23" selection-end-column="31" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/http/SSH2Util.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="280">
|
||||
<caret line="14" column="13" selection-start-line="14" selection-start-column="13" selection-end-line="14" selection-end-column="13" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="class#ConnectEntity#0;class#SSH2Util#0" />
|
||||
<element signature="method#login#0;class#SSH2Util#0" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/config/RestTemplateConfig.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1540">
|
||||
<caret line="77" column="19" selection-start-line="77" selection-start-column="19" selection-end-line="77" selection-end-column="19" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/service/ActuatorInfo.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="480">
|
||||
<caret line="24" column="22" selection-start-line="24" selection-start-column="22" selection-end-line="24" selection-end-column="22" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/utils/StringUtil.java" />
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/utils/config/ElasticsearchConfig.java" />
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/utils/LoggerUtil.java" />
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/io/CopyUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="480">
|
||||
<caret line="24" column="12" selection-start-line="24" selection-start-column="12" selection-end-line="24" selection-end-column="12" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -1072,19 +1043,6 @@
|
|||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="20">
|
||||
<caret line="1" selection-start-line="1" selection-end-line="1" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/data/KafkaUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="2305">
|
||||
<caret line="122" column="39" selection-start-line="122" selection-start-column="39" selection-end-line="122" selection-end-column="39" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -1092,33 +1050,13 @@
|
|||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="291">
|
||||
<caret line="307" column="16" selection-start-line="307" selection-start-column="16" selection-end-line="307" selection-end-column="16" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/logger/LoggerUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="188">
|
||||
<caret line="306" column="36" selection-start-line="306" selection-start-column="36" selection-end-line="306" selection-end-column="36" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/config/RedisConfig.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="231">
|
||||
<state relative-caret-position="1520">
|
||||
<caret line="91" column="49" selection-start-line="91" selection-start-column="49" selection-end-line="91" selection-end-column="49" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#3878#3879#0" expanded="true" />
|
||||
<element signature="e#3949#3950#0" expanded="true" />
|
||||
<element signature="e#4064#4065#0" expanded="true" />
|
||||
<element signature="e#4136#4137#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -1131,42 +1069,11 @@
|
|||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/config/ElasticsearchClientConfig.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="309">
|
||||
<state relative-caret-position="1620">
|
||||
<caret line="105" column="50" selection-start-line="105" selection-start-column="50" selection-end-line="105" selection-end-column="50" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/pom.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="295">
|
||||
<caret line="15" column="46" selection-start-line="15" selection-start-column="46" selection-end-line="15" selection-end-column="46" />
|
||||
<folding>
|
||||
<element signature="n#build#0;n#project#0;n#!!top" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
<provider editor-type-id="MavenHelperPluginDependencyAnalyzer" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/test/java/site/cnkj/utils/CommonApplicationTests.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="120">
|
||||
<caret line="6" lean-forward="true" selection-start-line="6" selection-end-line="6" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/serialize/SoapXmlFormatUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1720">
|
||||
<caret line="86" column="8" selection-start-line="86" selection-start-column="8" selection-end-line="86" selection-end-column="8" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/object/servlet/DataResult.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="140">
|
||||
|
@ -1174,26 +1081,205 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/http/RestTemplateUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="196">
|
||||
<caret line="36" column="40" selection-start-line="36" selection-start-column="40" selection-end-line="36" selection-end-column="40" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/data/RedisUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/README.md">
|
||||
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
||||
<state split_layout="SPLIT">
|
||||
<first_editor relative-caret-position="120">
|
||||
<first_editor relative-caret-position="20">
|
||||
<caret line="6" column="54" selection-start-line="6" selection-start-column="54" selection-end-line="6" selection-end-column="54" />
|
||||
</first_editor>
|
||||
<second_editor />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="jar://$MAVEN_REPOSITORY$/org/springframework/spring-beans/5.2.8.RELEASE/spring-beans-5.2.8.RELEASE.jar!/org/springframework/beans/factory/xml/XmlBeanFactory.class">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="140">
|
||||
<caret line="13" column="11" selection-start-line="13" selection-start-column="11" selection-end-line="13" selection-end-column="11" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="jar://$MAVEN_REPOSITORY$/org/springframework/spring-context/5.2.8.RELEASE/spring-context-5.2.8.RELEASE.jar!/org/springframework/context/support/FileSystemXmlApplicationContext.class">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="120">
|
||||
<caret line="13" column="13" selection-start-line="13" selection-start-column="13" selection-end-line="13" selection-end-column="13" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="jar://$MAVEN_REPOSITORY$/org/springframework/spring-core/5.2.8.RELEASE/spring-core-5.2.8.RELEASE.jar!/org/springframework/core/io/DefaultResourceLoader.class">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="720">
|
||||
<caret line="64" column="20" selection-start-line="64" selection-start-column="20" selection-end-line="64" selection-end-column="20" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/http/SSH2Util.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="120">
|
||||
<caret line="6" column="40" selection-start-line="6" selection-start-column="40" selection-end-line="6" selection-end-column="40" />
|
||||
<folding>
|
||||
<element signature="method#login#0;class#SSH2Util#0" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="jar://$MAVEN_REPOSITORY$/org/springframework/spring-context/5.2.8.RELEASE/spring-context-5.2.8.RELEASE-sources.jar!/org/springframework/context/support/FileSystemXmlApplicationContext.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="660">
|
||||
<caret line="51" column="17" selection-start-line="51" selection-start-column="17" selection-end-line="51" selection-end-column="17" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/data/KafkaUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="60">
|
||||
<caret line="3" column="40" selection-start-line="3" selection-start-column="40" selection-end-line="3" selection-end-column="40" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="jar://$MAVEN_REPOSITORY$/org/mongodb/mongodb-driver/3.8.2/mongodb-driver-3.8.2-sources.jar!/com/mongodb/MongoClientURI.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="235">
|
||||
<caret line="329" column="39" selection-start-line="329" selection-start-column="39" selection-end-line="329" selection-end-column="39" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/pom.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="2720">
|
||||
<caret line="136" column="36" selection-start-line="136" selection-start-column="36" selection-end-line="136" selection-end-column="36" />
|
||||
<folding>
|
||||
<element signature="n#build#0;n#project#0;n#!!top" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
<provider editor-type-id="MavenHelperPluginDependencyAnalyzer" />
|
||||
</entry>
|
||||
<entry file="jar://$MAVEN_REPOSITORY$/org/mongodb/mongodb-driver-legacy/4.0.5/mongodb-driver-legacy-4.0.5-sources.jar!/com/mongodb/MongoClientURI.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-1373">
|
||||
<caret line="246" column="11" selection-start-line="246" selection-start-column="11" selection-end-line="246" selection-end-column="11" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/data/ProtobufOuter.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="851">
|
||||
<caret line="66" column="19" selection-start-line="66" selection-start-column="19" selection-end-line="66" selection-end-column="19" />
|
||||
<folding>
|
||||
<element signature="e#2522#2523#0" expanded="true" />
|
||||
<element signature="e#2560#2561#0" expanded="true" />
|
||||
<element signature="e#2595#2596#0" expanded="true" />
|
||||
<element signature="e#2663#2664#0" expanded="true" />
|
||||
<element signature="e#2778#2779#0" expanded="true" />
|
||||
<element signature="e#2827#2828#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/data/ProtobufOuterOperation.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-593">
|
||||
<caret line="16" column="13" selection-start-line="16" selection-start-column="13" selection-end-line="16" selection-end-column="13" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/data/MongoClientsInit.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="31">
|
||||
<caret line="23" column="13" selection-start-line="23" selection-start-column="13" selection-end-line="23" selection-end-column="13" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/config/MongodbConfig.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="780">
|
||||
<caret line="39" column="17" selection-start-line="39" selection-start-column="17" selection-end-line="39" selection-end-column="17" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/data/MongodbUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="360">
|
||||
<caret line="28" column="38" lean-forward="true" selection-start-line="28" selection-start-column="38" selection-end-line="28" selection-end-column="38" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/test/java/site/cnkj/utils/CommonApplicationTests.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="467">
|
||||
<caret line="139" column="99" lean-forward="true" selection-start-line="132" selection-start-column="12" selection-end-line="139" selection-end-column="99" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/io/DES.java">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/io/RSAEncrypt.java">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/config/RestTemplateConfig.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1220">
|
||||
<caret line="77" column="19" selection-start-line="77" selection-start-column="19" selection-end-line="77" selection-end-column="19" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/logger/LoggerUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="5880">
|
||||
<caret line="306" column="36" selection-start-line="306" selection-start-column="36" selection-end-line="306" selection-end-column="36" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/serialize/SoapXmlFormatUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1560">
|
||||
<caret line="86" column="8" selection-start-line="86" selection-start-column="8" selection-end-line="86" selection-end-column="8" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/service/ActuatorInfo.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="260">
|
||||
<caret line="24" column="22" selection-start-line="24" selection-start-column="22" selection-end-line="24" selection-end-column="22" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/http/HttpCommonUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/config/AsyncExecutePool.java">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/config/AsyncThreadPoolConfig.java">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/http/RestTemplateUtil.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="140">
|
||||
<caret line="14" column="12" selection-start-line="14" selection-start-column="12" selection-end-line="14" selection-end-column="12" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/file/FileEncryptDecrypt.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="420">
|
||||
<caret line="70" column="44" lean-forward="true" selection-start-line="70" selection-start-column="44" selection-end-line="70" selection-end-column="44" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</component>
|
||||
<component name="masterDetails">
|
||||
<states>
|
||||
|
|
15
pom.xml
15
pom.xml
|
@ -125,11 +125,11 @@
|
|||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-mongodb</artifactId>
|
||||
<version>2.1.3.RELEASE</version>
|
||||
</dependency>
|
||||
<!--<dependency>-->
|
||||
<!--<groupId>org.springframework.boot</groupId>-->
|
||||
<!--<artifactId>spring-boot-starter-data-mongodb</artifactId>-->
|
||||
<!--<version>2.1.3.RELEASE</version>-->
|
||||
<!--</dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mongodb</groupId>
|
||||
|
@ -173,6 +173,11 @@
|
|||
<artifactId>dom4j</artifactId>
|
||||
<version>1.6.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
<version>5.2.8.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
package site.cnkj.common.config;
|
||||
|
||||
|
||||
import com.mongodb.MongoClient;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.SimpleMongoDbFactory;
|
||||
import site.cnkj.common.utils.data.MongodbUtil;
|
||||
|
||||
/*
|
||||
* @version 1.0 created by LXW on 2019/11/22 16:50
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnProperty(prefix="spring.data.mongodb", name = "uri")
|
||||
public class MongodbConfig {
|
||||
|
||||
private String host;
|
||||
private int port;
|
||||
private String database;
|
||||
|
||||
/**
|
||||
* 默认集合名称前缀
|
||||
*/
|
||||
private String mongoName = "";
|
||||
|
||||
@Bean
|
||||
public MongoDbFactory mongoDbFactory() throws Exception {
|
||||
return new SimpleMongoDbFactory(new MongoClient(host, port), database);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public MongoTemplate getMongoTemplate() throws Exception {
|
||||
return new MongoTemplate(mongoDbFactory());
|
||||
}
|
||||
|
||||
@Bean(name = "mongodbUtil")
|
||||
public MongodbUtil mongodbUtil(MongoTemplate mongoTemplate) {
|
||||
return new MongodbUtil(mongoTemplate, mongoName);
|
||||
}
|
||||
|
||||
}
|
|
@ -15,7 +15,9 @@ import org.springframework.data.redis.serializer.StringRedisSerializer;
|
|||
import site.cnkj.common.object.redis.Receiver;
|
||||
import site.cnkj.common.utils.data.RedisUtil;
|
||||
|
||||
|
||||
/**
|
||||
* Created by rx on 2018/8/22.
|
||||
*/
|
||||
@Configuration
|
||||
public class RedisConfig {
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ public class CommonInfo {
|
|||
|
||||
/**
|
||||
* @Desc ResponseCode for servlet request callback
|
||||
* @Version delete from 0.3.5 version and replace by cn.migu.log.ResponseBodyCode
|
||||
* @Version delete from 0.3.5 version and replace by <url>cn.migu.log.common.object.servlet.ResponseBodyCode</url>
|
||||
*/
|
||||
@Deprecated
|
||||
public static class ResponseCode{
|
||||
|
|
|
@ -7,31 +7,17 @@ package site.cnkj.common.object.servlet;
|
|||
*/
|
||||
public enum ResponseBodyCode {
|
||||
|
||||
SUCCESS{
|
||||
@Override
|
||||
public String getCode() {
|
||||
return "000000";
|
||||
}
|
||||
},
|
||||
FAILED{
|
||||
@Override
|
||||
public String getCode() {
|
||||
return "100000";
|
||||
}
|
||||
},
|
||||
WARNING{
|
||||
@Override
|
||||
public String getCode() {
|
||||
return "200000";
|
||||
}
|
||||
},
|
||||
ERROR{
|
||||
@Override
|
||||
public String getCode() {
|
||||
return "300000";
|
||||
}
|
||||
};
|
||||
SUCCESS("000000"), FAILED("100000"), WARNING("200000"), ERROR("300000");
|
||||
|
||||
public abstract String getCode();
|
||||
|
||||
private String code;
|
||||
|
||||
ResponseBodyCode(String code){
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCode(){
|
||||
return this.code;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package site.cnkj.common.utils.data;
|
||||
|
||||
import com.mongodb.client.MongoClient;
|
||||
import com.mongodb.client.MongoClients;
|
||||
|
||||
import com.mongodb.MongoClient;
|
||||
import com.mongodb.MongoClientOptions;
|
||||
import com.mongodb.MongoClientURI;
|
||||
import com.mongodb.client.MongoDatabase;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
@ -16,25 +17,20 @@ import java.util.HashMap;
|
|||
* @author LXW
|
||||
* @create 2020/8/17 9:50
|
||||
* @Description
|
||||
* 1. 使用本bean的时候需要在启动类上加上下面这行注解,否则会自动链接本地mongo出现异常
|
||||
* <code>@EnableAutoConfiguration(exclude = {MongoAutoConfiguration.class})</code>
|
||||
* 2. 使用MongoClient的时候不能同时使用SpringMongo,如果存在SpringMongo的maven依赖需要去除
|
||||
*/
|
||||
@Data
|
||||
@Component
|
||||
@EnableAutoConfiguration(exclude = {MongoAutoConfiguration.class})
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "spring.data.mongodb")
|
||||
@ConditionalOnProperty(prefix = "spring.data.mongodb", value = "activity", havingValue = "true")
|
||||
public class MongoClientsInit {
|
||||
|
||||
private HashMap<String, String> uri = new HashMap<>();
|
||||
|
||||
public void setUri(HashMap<String, String> uri) {
|
||||
this.uri = uri;
|
||||
}
|
||||
|
||||
private HashMap<String, MongoDatabase> mongoClientDatabases = new HashMap<>();
|
||||
|
||||
public HashMap<String, MongoDatabase> getMongoClientDatabases() {
|
||||
return mongoClientDatabases;
|
||||
}
|
||||
|
||||
private String getDatabase(String mongoUri) throws Exception{
|
||||
String databaseName = "";
|
||||
String substring = mongoUri.substring(10, mongoUri.length());
|
||||
|
@ -48,13 +44,18 @@ public class MongoClientsInit {
|
|||
return databaseName;
|
||||
}
|
||||
|
||||
|
||||
@PostConstruct
|
||||
public void init() throws Exception{
|
||||
if (uri.size() > 0){
|
||||
for (String name : uri.keySet()) {
|
||||
String url = uri.get(name);
|
||||
MongoClient mongoClient = MongoClients.create(url);
|
||||
//配制连接池
|
||||
MongoClientOptions.Builder mongoClientBuilder = new MongoClientOptions.Builder();
|
||||
mongoClientBuilder.connectionsPerHost(30);
|
||||
mongoClientBuilder.connectTimeout(30000);
|
||||
mongoClientBuilder.retryWrites(true);
|
||||
//支持ssl连接
|
||||
MongoClient mongoClient = new MongoClient(new MongoClientURI(url, mongoClientBuilder));
|
||||
MongoDatabase mongoClientDatabase = mongoClient.getDatabase(getDatabase(url));
|
||||
mongoClientDatabases.put(name, mongoClientDatabase);
|
||||
}
|
||||
|
|
|
@ -1,636 +0,0 @@
|
|||
package site.cnkj.common.utils.data;
|
||||
|
||||
import com.mongodb.client.ClientSession;
|
||||
import com.mongodb.client.result.UpdateResult;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.bson.types.ObjectId;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.query.Criteria;
|
||||
import org.springframework.data.mongodb.core.query.Query;
|
||||
import org.springframework.data.mongodb.core.query.Update;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/*
|
||||
* @version 1.0 created by LXW on 2019/11/22 17:21
|
||||
*/
|
||||
public class MongodbUtil {
|
||||
|
||||
private MongoTemplate mongoTemplate;
|
||||
|
||||
private final String mongoName;
|
||||
|
||||
public MongodbUtil(MongoTemplate mongoTemplate, String mongoName){
|
||||
this.mongoTemplate = mongoTemplate;
|
||||
this.mongoName = mongoName;
|
||||
}
|
||||
|
||||
public Class save(Class document){
|
||||
try {
|
||||
String collectionName = mongoTemplate.getCollectionName(document);
|
||||
if (StringUtils.isNotEmpty(mongoName)){
|
||||
collectionName = mongoName + ":" + collectionName;
|
||||
}
|
||||
return mongoTemplate.save(document, collectionName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Class save(Class c, String collectionName){
|
||||
try {
|
||||
if (StringUtils.isNotEmpty(mongoName)){
|
||||
collectionName = mongoName + ":" + collectionName;
|
||||
}
|
||||
return mongoTemplate.save(c, collectionName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public <T> Collection<T> insert(Collection<? extends T> batchToSave, String collectionName){
|
||||
try {
|
||||
if (StringUtils.isNotEmpty(mongoName)){
|
||||
collectionName = mongoName + ":" + collectionName;
|
||||
}
|
||||
return mongoTemplate.insert(batchToSave, collectionName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除指定名称下执行值的数据
|
||||
* @param key 名字
|
||||
* @param value 值
|
||||
* @param document 文档对象
|
||||
* @return 成功删除的文档数量
|
||||
*/
|
||||
public <T> Long removeByQuery(String key, String value, Class<T> document){
|
||||
try {
|
||||
Query query = Query.query(Criteria.where(key).is(value));
|
||||
return mongoTemplate.remove(query, document).getDeletedCount();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除指定名称下执行值的数据
|
||||
* @param key 名字
|
||||
* @param value 值
|
||||
* @param collectionName 集合名称
|
||||
* @return 成功删除的文档数量
|
||||
*/
|
||||
public Long removeByQuery(String key, String value, String collectionName){
|
||||
try {
|
||||
if (StringUtils.isNotEmpty(mongoName)){
|
||||
collectionName = mongoName + ":" + collectionName;
|
||||
}
|
||||
Query query = Query.query(Criteria.where(key).is(value));
|
||||
return mongoTemplate.remove(query, collectionName).getDeletedCount();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过对象删除文档
|
||||
* @param document 对象
|
||||
*/
|
||||
public <T> void dropCollection(Class<T> document){
|
||||
try {
|
||||
mongoTemplate.dropCollection(document);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过集合名删除文档
|
||||
* @param collectionName 集合名
|
||||
*/
|
||||
public void dropCollection(String collectionName){
|
||||
try {
|
||||
if (StringUtils.isNotEmpty(mongoName)){
|
||||
collectionName = mongoName + ":" + collectionName;
|
||||
}
|
||||
mongoTemplate.dropCollection(collectionName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除当前数据库
|
||||
*/
|
||||
public void dropDataBase(){
|
||||
try {
|
||||
mongoTemplate.getDb().drop();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除当前数据库
|
||||
*/
|
||||
public void dropDataBase(ClientSession clientSession){
|
||||
try {
|
||||
mongoTemplate.getDb().drop(clientSession);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public <T> T findAndRemoveByQuery(String key, String value, Class<T> document){
|
||||
return findAndRemoveByQuery(key, value, document, mongoTemplate.getCollectionName(document));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出符合条件的第一个结果,并将符合条件的数据删除,只会删除第一条
|
||||
* @param key 索引
|
||||
* @param value 值
|
||||
* @param document 文档
|
||||
* @param collectionName 集合名
|
||||
* @return 返回删除的记录
|
||||
*/
|
||||
public <T> T findAndRemoveByQuery(String key, String value, Class<T> document, String collectionName){
|
||||
try {
|
||||
if (StringUtils.isEmpty(collectionName)){
|
||||
collectionName = mongoTemplate.getCollectionName(document);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(mongoName)){
|
||||
collectionName = mongoName + ":" + collectionName;
|
||||
}
|
||||
Query query = Query.query(Criteria.where(key).is(value));
|
||||
return mongoTemplate.findAndRemove(query, document, collectionName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public <T> List<T> findAllAndRemoveByQuery(String key, String value, Class<T> document){
|
||||
return findAllAndRemoveByQuery(key, value, document, mongoTemplate.getCollectionName(document));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出符合条件的所有结果,并将符合条件的所有数据删除
|
||||
* @param key 索引
|
||||
* @param value 值
|
||||
* @param document 文档
|
||||
* @param collectionName 集合名
|
||||
* @return 返回删除的记录
|
||||
*/
|
||||
public <T> List<T> findAllAndRemoveByQuery(String key, String value, Class<T> document, String collectionName){
|
||||
try {
|
||||
if (StringUtils.isEmpty(collectionName)){
|
||||
collectionName = mongoTemplate.getCollectionName(document);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(mongoName)){
|
||||
collectionName = mongoName + ":" + collectionName;
|
||||
}
|
||||
Query query = Query.query(Criteria.where(key).is(value));
|
||||
return mongoTemplate.findAllAndRemove(query, document, collectionName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public UpdateResult updateFirstByQuery(String findKey, String findValue, String updateKey, String updateValue, Class document){
|
||||
return updateFirstByQuery(findKey, findValue, updateKey, updateValue, document, mongoTemplate.getCollectionName(document));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改查询到的结果中的第一条记录
|
||||
* @param findKey 查询key
|
||||
* @param findValue 查询value
|
||||
* @param updateKey 更新key
|
||||
* @param updateValue 更新value
|
||||
* @param document 文档对象
|
||||
* @param collectionName 集合名称
|
||||
* @return 更新结果
|
||||
*/
|
||||
public UpdateResult updateFirstByQuery(String findKey, String findValue, String updateKey, String updateValue, Class document, String collectionName){
|
||||
try {
|
||||
if (StringUtils.isEmpty(collectionName)){
|
||||
collectionName = mongoTemplate.getCollectionName(document);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(mongoName)){
|
||||
collectionName = mongoName + ":" + collectionName;
|
||||
}
|
||||
Query query = Query.query(Criteria.where(findKey).is(findValue));
|
||||
Update update = Update.update(updateKey, updateValue);
|
||||
return mongoTemplate.updateFirst(query, update, document, collectionName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public UpdateResult updateAllByQuery(String findKey, String findValue, String updateKey, String updateValue, Class document){
|
||||
return updateAllByQuery(findKey, findValue, updateKey, updateValue, document, mongoTemplate.getCollectionName(document));
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新查询到的全部结果
|
||||
* @param findKey 查询key
|
||||
* @param findValue 查询value
|
||||
* @param updateKey 更新key
|
||||
* @param updateValue 更新value
|
||||
* @param document 文档对象
|
||||
* @param collectionName 集合名称
|
||||
* @return 更新结果
|
||||
*/
|
||||
public UpdateResult updateAllByQuery(String findKey, String findValue, String updateKey, String updateValue, Class document, String collectionName){
|
||||
try {
|
||||
if (StringUtils.isEmpty(collectionName)){
|
||||
collectionName = mongoTemplate.getCollectionName(document);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(mongoName)){
|
||||
collectionName = mongoName + ":" + collectionName;
|
||||
}
|
||||
Query query = Query.query(Criteria.where(findKey).is(findValue));
|
||||
Update update = Update.update(updateKey, updateValue);
|
||||
return mongoTemplate.updateMulti(query, update, document, collectionName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public UpdateResult updateOrInsertByQuery(String findKey, String findValue, String updateKey, String updateValue, Class document){
|
||||
return updateOrInsertByQuery(findKey, findValue, updateKey, updateValue, document, mongoTemplate.getCollectionName(document));
|
||||
}
|
||||
|
||||
/**
|
||||
* 特殊更新,更新数据,如果没有数据则以此条件创建一条新的数据
|
||||
* 当没有符合条件的文档,就以这个条件和更新文档为基础创建一个新的文档,如果找到匹配的文档就正常的更新
|
||||
*
|
||||
* @param findKey 查询key
|
||||
* @param findValue 查询value
|
||||
* @param updateKey 更新key
|
||||
* @param updateValue 更新value
|
||||
* @param document 文档对象
|
||||
* @param collectionName 集合名称
|
||||
* @return 更新结果
|
||||
*/
|
||||
public UpdateResult updateOrInsertByQuery(String findKey, String findValue, String updateKey, String updateValue, Class document, String collectionName){
|
||||
try {
|
||||
if (StringUtils.isEmpty(collectionName)){
|
||||
collectionName = mongoTemplate.getCollectionName(document);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(mongoName)){
|
||||
collectionName = mongoName + ":" + collectionName;
|
||||
}
|
||||
Query query = Query.query(Criteria.where(findKey).is(findValue));
|
||||
Update update = Update.update(updateKey, updateValue);
|
||||
return mongoTemplate.upsert(query, update, document, collectionName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public UpdateResult setByQuery(String findKey, String findValue, String updateKey, String updateValue, String setKey, Object setValue, Class document){
|
||||
return setByQuery(findKey, findValue, updateKey, updateValue, setKey, setValue, document, mongoTemplate.getCollectionName(document));
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新指定内容的数据,如果更新的setKey不存在则创建一个新的key
|
||||
*
|
||||
* @param findKey 查询key
|
||||
* @param findValue 查询value
|
||||
* @param updateKey 更新key
|
||||
* @param updateValue 更新value
|
||||
* @param setKey 设置key
|
||||
* @param setValue 设置value
|
||||
* @param document 文档对象
|
||||
* @param collectionName 集合名称
|
||||
* @return 更新结果
|
||||
*/
|
||||
public UpdateResult setByQuery(String findKey, String findValue, String updateKey, String updateValue, String setKey, Object setValue, Class document, String collectionName){
|
||||
try {
|
||||
if (StringUtils.isEmpty(collectionName)){
|
||||
collectionName = mongoTemplate.getCollectionName(document);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(mongoName)){
|
||||
collectionName = mongoName + ":" + collectionName;
|
||||
}
|
||||
Query query = Query.query(Criteria.where(findKey).is(findValue));
|
||||
Update update = Update.update(updateKey, updateValue).set(setKey, setValue);
|
||||
return mongoTemplate.updateMulti(query, update, document, collectionName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public UpdateResult incByQuery(String findKey, String findValue, String updateKey, String updateValue, String setKey, Number setValue, Class document){
|
||||
return incByQuery(findKey, findValue, updateKey, updateValue, setKey, setValue, document, mongoTemplate.getCollectionName(document));
|
||||
}
|
||||
|
||||
/**
|
||||
* 累加单条数据中的指定setKey的值
|
||||
* inc方法用于做累加操作,将setKey的值在之前的基础上加上setValue
|
||||
*
|
||||
* @param findKey 查询key
|
||||
* @param findValue 查询value
|
||||
* @param updateKey 更新key
|
||||
* @param updateValue 更新value
|
||||
* @param setKey 设置key
|
||||
* @param setValue 增长的值
|
||||
* @param document 文档对象
|
||||
* @param collectionName 集合名称
|
||||
* @return 更新结果
|
||||
*/
|
||||
public UpdateResult incByQuery(String findKey, String findValue, String updateKey, String updateValue, String setKey, Number setValue, Class document, String collectionName){
|
||||
try {
|
||||
if (StringUtils.isEmpty(collectionName)){
|
||||
collectionName = mongoTemplate.getCollectionName(document);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(mongoName)){
|
||||
collectionName = mongoName + ":" + collectionName;
|
||||
}
|
||||
Query query = Query.query(Criteria.where(findKey).is(findValue));
|
||||
Update update = Update.update(updateKey, updateValue).inc(setKey, setValue);
|
||||
return mongoTemplate.updateMulti(query, update, document, collectionName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public UpdateResult renameByQuery(String findKey, String findValue, String updateKey, String updateValue, String setKey, String setValue, Class document){
|
||||
return renameByQuery(findKey, findValue, updateKey, updateValue, setKey, setValue, document, mongoTemplate.getCollectionName(document));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改单条数据中的setKey的名称
|
||||
*
|
||||
* @param findKey 查询key
|
||||
* @param findValue 查询value
|
||||
* @param updateKey 更新key
|
||||
* @param updateValue 更新value
|
||||
* @param setKey 修改前的名字
|
||||
* @param setValue 修改后的名字
|
||||
* @param document 文档对象
|
||||
* @param collectionName 集合名称
|
||||
* @return 更新结果
|
||||
*/
|
||||
public UpdateResult renameByQuery(String findKey, String findValue, String updateKey, String updateValue, String setKey, String setValue, Class document, String collectionName){
|
||||
try {
|
||||
if (StringUtils.isEmpty(collectionName)){
|
||||
collectionName = mongoTemplate.getCollectionName(document);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(mongoName)){
|
||||
collectionName = mongoName + ":" + collectionName;
|
||||
}
|
||||
Query query = Query.query(Criteria.where(findKey).is(findValue));
|
||||
Update update = Update.update(updateKey, updateValue).rename(setKey, setValue);
|
||||
return mongoTemplate.updateMulti(query, update, document, collectionName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public UpdateResult unsetByQuery(String findKey, String findValue, String updateKey, String updateValue, String setKey, Class document){
|
||||
return unsetByQuery(findKey, findValue, updateKey, updateValue, setKey, document, mongoTemplate.getCollectionName(document));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除指定内容数据中的key
|
||||
*
|
||||
* @param findKey 查询key
|
||||
* @param findValue 查询value
|
||||
* @param updateKey 更新key
|
||||
* @param updateValue 更新value
|
||||
* @param setKey 需要删除的key
|
||||
* @param document 文档对象
|
||||
* @param collectionName 集合名称
|
||||
* @return 更新结果
|
||||
*/
|
||||
public UpdateResult unsetByQuery(String findKey, String findValue, String updateKey, String updateValue, String setKey, Class document, String collectionName){
|
||||
try {
|
||||
if (StringUtils.isEmpty(collectionName)){
|
||||
collectionName = mongoTemplate.getCollectionName(document);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(mongoName)){
|
||||
collectionName = mongoName + ":" + collectionName;
|
||||
}
|
||||
Query query = Query.query(Criteria.where(findKey).is(findValue));
|
||||
Update update = Update.update(updateKey, updateValue).unset(setKey);
|
||||
return mongoTemplate.updateMulti(query, update, document, collectionName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public UpdateResult pullByQuery(String findKey, String findValue, String updateKey, String updateValue, String setKey, String setValue, Class document){
|
||||
return pullByQuery(findKey, findValue, updateKey, updateValue, setKey, setValue, document, mongoTemplate.getCollectionName(document));
|
||||
}
|
||||
|
||||
/**
|
||||
* update的pull方法用于删除数组中的值
|
||||
*
|
||||
* @param findKey 查询key
|
||||
* @param findValue 查询value
|
||||
* @param updateKey 更新key
|
||||
* @param updateValue 更新value
|
||||
* @param setKey 数组名
|
||||
* @param setValue 删除的值
|
||||
* @param document 文档对象
|
||||
* @param collectionName 集合名称
|
||||
* @return 更新结果
|
||||
*/
|
||||
public UpdateResult pullByQuery(String findKey, String findValue, String updateKey, String updateValue, String setKey, String setValue, Class document, String collectionName){
|
||||
try {
|
||||
if (StringUtils.isEmpty(collectionName)){
|
||||
collectionName = mongoTemplate.getCollectionName(document);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(mongoName)){
|
||||
collectionName = mongoName + ":" + collectionName;
|
||||
}
|
||||
Query query = Query.query(Criteria.where(findKey).is(findValue));
|
||||
Update update = Update.update(updateKey, updateValue).pull(setKey, setValue);
|
||||
return mongoTemplate.updateMulti(query, update, document, collectionName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public <T> List<T> findByQuery(String findKey, String findValue, Class<T> document){
|
||||
return findByQuery(findKey, findValue, document, mongoTemplate.getCollectionName(document));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的数据集合
|
||||
*
|
||||
* @param findKey
|
||||
* @param findValue
|
||||
* @param document
|
||||
* @param collectionName
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public <T> List<T> findByQuery(String findKey, String findValue, Class<T> document, String collectionName){
|
||||
try {
|
||||
if (StringUtils.isEmpty(collectionName)){
|
||||
collectionName = mongoTemplate.getCollectionName(document);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(mongoName)){
|
||||
collectionName = mongoName + ":" + collectionName;
|
||||
}
|
||||
Query query = Query.query(Criteria.where(findKey).is(findValue));
|
||||
return mongoTemplate.find(query, document, collectionName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public <T> T findOneByQuery(String findKey, String findValue, Class<T> document){
|
||||
return findOneByQuery(findKey, findValue, document, mongoTemplate.getCollectionName(document));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的一条数据
|
||||
*
|
||||
* @param findKey
|
||||
* @param findValue
|
||||
* @param document
|
||||
* @param collectionName
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public <T> T findOneByQuery(String findKey, String findValue, Class<T> document, String collectionName){
|
||||
try {
|
||||
if (StringUtils.isEmpty(collectionName)){
|
||||
collectionName = mongoTemplate.getCollectionName(document);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(mongoName)){
|
||||
collectionName = mongoName + ":" + collectionName;
|
||||
}
|
||||
Query query = Query.query(Criteria.where(findKey).is(findValue));
|
||||
return mongoTemplate.findOne(query, document, collectionName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public <T> List<T> findAll(Class<T> document){
|
||||
return findAll(document, mongoTemplate.getCollectionName(document));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的一条数据
|
||||
*
|
||||
* @param document
|
||||
* @param collectionName
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public <T> List<T> findAll(Class<T> document, String collectionName){
|
||||
try {
|
||||
if (StringUtils.isEmpty(collectionName)){
|
||||
collectionName = mongoTemplate.getCollectionName(document);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(mongoName)){
|
||||
collectionName = mongoName + ":" + collectionName;
|
||||
}
|
||||
return mongoTemplate.findAll(document, collectionName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Long countByQuery(String findKey, String findValue, Class document){
|
||||
return countByQuery(findKey, findValue, document, mongoTemplate.getCollectionName(document));
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计符合查询条件的数据数量
|
||||
*
|
||||
* @param findKey
|
||||
* @param findValue
|
||||
* @param document
|
||||
* @param collectionName
|
||||
* @return
|
||||
*/
|
||||
public Long countByQuery(String findKey, String findValue, Class document, String collectionName){
|
||||
try {
|
||||
if (StringUtils.isEmpty(collectionName)){
|
||||
collectionName = mongoTemplate.getCollectionName(document);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(mongoName)){
|
||||
collectionName = mongoName + ":" + collectionName;
|
||||
}
|
||||
Query query = Query.query(Criteria.where(findKey).is(findValue));
|
||||
return mongoTemplate.count(query, document, collectionName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Long countByQuery(String findKey, String findValue, String collectionName){
|
||||
try {
|
||||
if (StringUtils.isNotEmpty(mongoName)){
|
||||
collectionName = mongoName + ":" + collectionName;
|
||||
}
|
||||
Query query = Query.query(Criteria.where(findKey).is(findValue));
|
||||
return mongoTemplate.count(query, collectionName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public <T> T findById(Class<T> document, String id){
|
||||
return findById(document, id, mongoTemplate.getCollectionName(document));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键id进行查询
|
||||
*
|
||||
* @param document
|
||||
* @param id
|
||||
* @param collectionName
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public <T> T findById(Class<T> document, String id, String collectionName){
|
||||
try {
|
||||
if (StringUtils.isEmpty(collectionName)){
|
||||
collectionName = mongoTemplate.getCollectionName(document);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(mongoName)){
|
||||
collectionName = mongoName + ":" + collectionName;
|
||||
}
|
||||
return mongoTemplate.findById(new ObjectId(id), document, collectionName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -10,8 +10,33 @@ import java.util.*;
|
|||
/*
|
||||
* @version 1.0 created by LXW on 2018/11/8 16:11
|
||||
*/
|
||||
public class DateUtil {
|
||||
public final class DateUtil {
|
||||
|
||||
public enum FORMAT_ENUM{
|
||||
BASETIME_yyyy("yyyy"),BASETIME_MM("MM"),BASETIME_dd("dd"),BASETIME_HH("HH"),BASETIME_mm("mm"),BASETIME_ss("ss"), BASETIME_SSS("SSS"),
|
||||
FULLTIMEBY_yMd("yyyy-MM-dd"),FULLTIMEBY_yMdH("yyyy-MM-dd HH"),FULLTIMEBY_yMdHm("yyyy-MM-dd HH:mm"),
|
||||
FULLTIMEBY_yM("yyyy-MM"),FULLTIMEBY_Md("MM-dd"),FULLTIMEBY_Hms("HH:mm:ss"),FULLTIMEBY_Hm("HH:mm"),FULLTIMEBY_ms("mm:ss"),
|
||||
FULLTIMEBY_HmsS("HH:mm:ss.SSS"),NOSEGMENTATION_yM("yyyyMM"),NOSEGMENTATION_yMd("yyyyMMdd"),NOSEGMENTATION_Hm("HHmm"),
|
||||
NOSEGMENTATION_Hms("HHmmss"),NOSEGMENTATION_HmsS("HHmmssSSS"),NOSEGMENTATION_yMdHm("yyyyMMddHHmm"),NOSEGMENTATION_yMdHms("yyyyMMddHHmmss"),
|
||||
NOSEGMENTATION_yMdHmsS("yyyyMMddHHmmssSSS"),POINT_yMd("yyyy.MM.dd"),POINT_Hms("HH.mm.ss"),FULLTIMEBY_yMdHms("yyyy-MM-dd HH:mm:ss"),
|
||||
FULLTIMEBY_yMdHmsS("yyyy-MM-dd HH:mm:ss.SSS"),FULLTIMEFORMAT_yMd("yyyy年MM月dd日"),FULLTIMEFORMAT_Hms("HH时mm分ss秒"),
|
||||
FULLTIMEFORMAT_yMdHms("yyyy年MM月dd日 HH时mm分ss秒"),FULLTIMEFORMAT_yMdHmsS("yyyy年MM月dd日 HH时mm分ss秒SSS毫秒");
|
||||
|
||||
private FORMAT_ENUM(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
private String value;
|
||||
|
||||
public String getValue(){
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Deprecated use enum FORMAT_ENUM
|
||||
*/
|
||||
@Deprecated
|
||||
public static class FORMAT{
|
||||
//基本单位 年
|
||||
public static final String BASETIME_yyyy = "yyyy";
|
||||
|
@ -98,7 +123,7 @@ public class DateUtil {
|
|||
}
|
||||
|
||||
public static String timeStamp2fulltime(Date date){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(FORMAT.FULLTIMEBY_yMdHms);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(FORMAT_ENUM.FULLTIMEBY_yMdHms.getValue());
|
||||
return sdf.format(date);
|
||||
}
|
||||
|
||||
|
@ -112,8 +137,7 @@ public class DateUtil {
|
|||
public static long getTodayEarlyMorning(String time, String timeFormat){
|
||||
long current=translateDateToTimestamp(time, timeFormat);//当前时间毫秒数
|
||||
long zero=current/(1000*3600*24)*(1000*3600*24)-TimeZone.getDefault().getRawOffset();//前一天的零点零分零秒的毫秒数
|
||||
long startTime = zero + 24*60*60*1000;
|
||||
return startTime;
|
||||
return zero + 24*60*60*1000;
|
||||
}
|
||||
|
||||
|
||||
|
@ -127,8 +151,7 @@ public class DateUtil {
|
|||
public static long getTodayLaterMorning(String time, String timeFormat){
|
||||
long current=translateDateToTimestamp(time, timeFormat);//当前时间毫秒数
|
||||
long zero=current/(1000*3600*24)*(1000*3600*24)-TimeZone.getDefault().getRawOffset();//前一天的零点零分零秒的毫秒数
|
||||
long endTime = zero + 24*60*60*1000*2 - 1;
|
||||
return endTime;
|
||||
return zero + 24*60*60*1000*2 - 1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -160,7 +183,7 @@ public class DateUtil {
|
|||
type = "s";
|
||||
}
|
||||
if (timeFormat == null){
|
||||
timeFormat = FORMAT.FULLTIMEBY_yMdHmsS;
|
||||
timeFormat = FORMAT_ENUM.FULLTIMEBY_yMdHmsS.getValue();
|
||||
}
|
||||
long date = System.currentTimeMillis();
|
||||
Long now_time = new Long(1);
|
||||
|
@ -175,8 +198,7 @@ public class DateUtil {
|
|||
}else if ("d".equals(type)){
|
||||
now_time = date - pastTime*1000*60*60*24;
|
||||
}
|
||||
String finalTime = translateTimeToDate(now_time, timeFormat);
|
||||
return finalTime;
|
||||
return translateTimeToDate(now_time, timeFormat);
|
||||
}
|
||||
|
||||
public static String getThePastTime(int pastTime){
|
||||
|
@ -202,8 +224,7 @@ public class DateUtil {
|
|||
public static String getNowTimeByFormat(String timeFormat){
|
||||
Date date = new Date();
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(timeFormat);
|
||||
String today = simpleDateFormat.format(date);
|
||||
return today;
|
||||
return simpleDateFormat.format(date);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -214,8 +235,7 @@ public class DateUtil {
|
|||
*/
|
||||
public static String translateTimeToDate(Long timestamp, String timeFormat){
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(timeFormat);
|
||||
String da = simpleDateFormat.format(timestamp);
|
||||
return da;
|
||||
return simpleDateFormat.format(timestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -226,8 +246,7 @@ public class DateUtil {
|
|||
*/
|
||||
public static String translateDateToString(Date date, String timeFormat){
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(timeFormat);
|
||||
String da = simpleDateFormat.format(date);
|
||||
return da;
|
||||
return simpleDateFormat.format(date);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -277,10 +296,11 @@ public class DateUtil {
|
|||
Date date = null;
|
||||
try {
|
||||
date = simpleDateFormat.parse(time);
|
||||
return date.getTime();
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return date.getTime();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
@ -288,16 +308,15 @@ public class DateUtil {
|
|||
* 序列化字符串为时间格式
|
||||
* @param time 需要转换的字符串 (20181011 10:11:12.013)
|
||||
* @param timeFormat 字符串对应的时间格式 (yyyyMMdd HH:mm:ss.SSS)
|
||||
* @param timeTranselate 转换后需要的字符串格式 (yyyy年M月dd日 HH时mm分ss秒SSS毫秒)
|
||||
* @param timeTranslate 转换后需要的字符串格式 (yyyy年M月dd日 HH时mm分ss秒SSS毫秒)
|
||||
* @return 2018年10月11日 10时11分12秒13毫秒
|
||||
*/
|
||||
public static String serializationDate(String time, String timeFormat, String timeTranselate){
|
||||
public static String serializationDate(String time, String timeFormat, String timeTranslate){
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(timeFormat);
|
||||
try {
|
||||
Date date = simpleDateFormat.parse(time);
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat(timeTranselate);
|
||||
String formatTime = dateFormat.format(date);
|
||||
return formatTime;
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat(timeTranslate);
|
||||
return dateFormat.format(date);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -389,7 +408,7 @@ public class DateUtil {
|
|||
long delayTime = 0;
|
||||
if (executorTime <= 24 && executorTime>0){
|
||||
int num = 24 / executorTime;
|
||||
long tomorrowEarlyMorning = getTodayEarlyMorning(translateTimeToDate(getCurrentTime(), FORMAT.FULLTIMEBY_yMdHmsS), FORMAT.FULLTIMEBY_yMdHmsS);
|
||||
long tomorrowEarlyMorning = getTodayEarlyMorning(translateTimeToDate(getCurrentTime(), FORMAT_ENUM.FULLTIMEBY_yMdHmsS.getValue()), FORMAT_ENUM.FULLTIMEBY_yMdHmsS.getValue());
|
||||
long todayEarlyMorning = tomorrowEarlyMorning - 24*60*60*1000;
|
||||
long todayHour = num * executorTime * 3600000 + todayEarlyMorning;
|
||||
if (todayHour < getCurrentTime() && getCurrentTime() < tomorrowEarlyMorning){
|
||||
|
@ -452,12 +471,11 @@ public class DateUtil {
|
|||
* @return 2020-03-24 19:24:31
|
||||
*/
|
||||
public static String switchTime(String time) throws ParseException {
|
||||
SimpleDateFormat format2 = new SimpleDateFormat(FORMAT.FULLTIMEBY_yMdHms);
|
||||
SimpleDateFormat format2 = new SimpleDateFormat(FORMAT_ENUM.FULLTIMEBY_yMdHms.getValue());
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS Z");//格式化的表达式
|
||||
time = time.replace("Z", " UTC");//是空格+UTC
|
||||
Date data = format.parse(time);
|
||||
String format1 = format2.format(data);
|
||||
return format1;
|
||||
return format2.format(data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -472,8 +490,7 @@ public class DateUtil {
|
|||
SimpleDateFormat df1 = new SimpleDateFormat ("EEE MMM dd HH:mm:ss Z yyyy", Locale.UK);
|
||||
Date date1 = df1.parse(date.toString());
|
||||
SimpleDateFormat df2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String format = df2.format(date1);
|
||||
return format;
|
||||
return df2.format(date1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -529,7 +546,7 @@ public class DateUtil {
|
|||
!date_format.contains("mm") &&
|
||||
!date_format.contains("ss")){
|
||||
//月
|
||||
String toDate = DateUtil.translateTimeToDate(current_time, DateUtil.FORMAT.FULLTIMEBY_yM);
|
||||
String toDate = DateUtil.translateTimeToDate(current_time, FORMAT_ENUM.FULLTIMEBY_yM.getValue());
|
||||
Integer year = Integer.valueOf(toDate.split("-")[0]);
|
||||
Integer month = Integer.valueOf(toDate.split("-")[1]);
|
||||
int shang = parseInt / 12;
|
||||
|
@ -544,7 +561,7 @@ public class DateUtil {
|
|||
month = month - 12;
|
||||
}
|
||||
String i5 = month<10?"0"+String.valueOf(month):String.valueOf(month);
|
||||
Long translateDateToTimestamp = DateUtil.translateDateToTimestamp(String.valueOf(year) + "-" + i5, DateUtil.FORMAT.FULLTIMEBY_yM);
|
||||
Long translateDateToTimestamp = DateUtil.translateDateToTimestamp(String.valueOf(year) + "-" + i5, FORMAT_ENUM.FULLTIMEBY_yM.getValue());
|
||||
translateTimeToDate = DateUtil.translateTimeToDate(translateDateToTimestamp, date_format);
|
||||
}else if ((date_format.contains("YYYY")||date_format.contains("yyyy")) &&
|
||||
!date_format.contains("MM") &&
|
||||
|
@ -553,9 +570,9 @@ public class DateUtil {
|
|||
!date_format.contains("mm") &&
|
||||
!date_format.contains("ss")){
|
||||
//年
|
||||
String year = DateUtil.translateTimeToDate(current_time, FORMAT.BASETIME_yyyy);
|
||||
String year = DateUtil.translateTimeToDate(current_time, FORMAT_ENUM.BASETIME_yyyy.getValue());
|
||||
String value = String.valueOf(Integer.valueOf(year) + parseInt);
|
||||
Long aLong = DateUtil.translateDateToTimestamp(value, FORMAT.BASETIME_yyyy);
|
||||
Long aLong = DateUtil.translateDateToTimestamp(value, FORMAT_ENUM.BASETIME_yyyy.getValue());
|
||||
translateTimeToDate = DateUtil.translateTimeToDate(aLong, date_format);
|
||||
}else {
|
||||
translateTimeToDate = DateUtil.translateTimeToDate(current_time, date_format);
|
||||
|
@ -618,13 +635,13 @@ public class DateUtil {
|
|||
*/
|
||||
public static List<JSONObject> getAroundTimeList(String startTime, String endTime, int cut){
|
||||
List<JSONObject> times = new LinkedList<>();
|
||||
Long startTimestamp = DateUtil.translateDateToTimestamp(startTime, DateUtil.FORMAT.FULLTIMEBY_yMdHms)/1000;
|
||||
Long endTimestamp = DateUtil.translateDateToTimestamp(endTime, DateUtil.FORMAT.FULLTIMEBY_yMdHms)/1000;
|
||||
Long startTimestamp = DateUtil.translateDateToTimestamp(startTime, FORMAT_ENUM.FULLTIMEBY_yMdHms.getValue())/1000;
|
||||
Long endTimestamp = DateUtil.translateDateToTimestamp(endTime, FORMAT_ENUM.FULLTIMEBY_yMdHms.getValue())/1000;
|
||||
List<String> list = DateUtil.splitTimestamp(cut, startTimestamp, endTimestamp);
|
||||
for (String s : list) {
|
||||
String[] split = s.split(",");
|
||||
Date start_time = DateUtil.translateTimestampToDate(Long.valueOf(split[0]), DateUtil.FORMAT.FULLTIMEBY_yMdHms);
|
||||
Date end_time = DateUtil.translateTimestampToDate(Long.valueOf(split[1]), DateUtil.FORMAT.FULLTIMEBY_yMdHms);
|
||||
Date start_time = DateUtil.translateTimestampToDate(Long.valueOf(split[0]), FORMAT_ENUM.FULLTIMEBY_yMdHms.getValue());
|
||||
Date end_time = DateUtil.translateTimestampToDate(Long.valueOf(split[1]), FORMAT_ENUM.FULLTIMEBY_yMdHms.getValue());
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("startTime", start_time);
|
||||
jsonObject.put("endTime", end_time);
|
||||
|
|
|
@ -44,7 +44,7 @@ public class FileEncryptDecrypt {
|
|||
public static boolean encrypt(String keyPath, String input, String output){
|
||||
FileInputStream fileInputStream = null;
|
||||
FileOutputStream fileOutputStream = null;
|
||||
List<String> list = new ArrayList();
|
||||
List<String> list = new ArrayList<>();
|
||||
try {
|
||||
byte[] buffer = Files.readAllBytes(Paths.get(keyPath));
|
||||
X509EncodedKeySpec keySpec = new X509EncodedKeySpec(buffer);
|
||||
|
@ -53,20 +53,28 @@ public class FileEncryptDecrypt {
|
|||
|
||||
File inputFile = new File(input);
|
||||
File outputFile = new File(output);
|
||||
fileInputStream = new FileInputStream(inputFile);
|
||||
fileOutputStream = new FileOutputStream(outputFile);
|
||||
byte[] inputByte = new byte[116];
|
||||
int len;
|
||||
while((len = fileInputStream.read(inputByte)) != -1){
|
||||
list.add(new String(inputByte, 0, len));
|
||||
try {
|
||||
fileInputStream = new FileInputStream(inputFile);
|
||||
fileOutputStream = new FileOutputStream(outputFile);
|
||||
byte[] inputByte = new byte[116];
|
||||
int len;
|
||||
while((len = fileInputStream.read(inputByte)) != -1){
|
||||
list.add(new String(inputByte, 0, len));
|
||||
}
|
||||
for (String s : list) {
|
||||
byte [] encrypted = encrypt(publicKey, s);
|
||||
fileOutputStream.write(encrypted);
|
||||
fileOutputStream.flush();
|
||||
}
|
||||
}finally {
|
||||
if (fileInputStream != null){
|
||||
fileInputStream.close();
|
||||
}
|
||||
if (fileOutputStream != null){
|
||||
fileOutputStream.close();
|
||||
}
|
||||
}
|
||||
for (String s : list) {
|
||||
byte [] encrypted = encrypt(publicKey, s);
|
||||
fileOutputStream.write(encrypted);
|
||||
fileOutputStream.flush();
|
||||
}
|
||||
fileOutputStream.close();
|
||||
fileInputStream.close();
|
||||
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
|
|
@ -278,12 +278,12 @@ public class FileUtil {
|
|||
}
|
||||
|
||||
public static File getRecoverFileName(String templateName, String paramsNum, String path) throws Exception{
|
||||
String translateTimeToDate = DateUtil.translateTimeToDate(DateUtil.getLastDaysTimestamp(1), DateUtil.FORMAT.NOSEGMENTATION_yMd);
|
||||
String translateTimeToDate = DateUtil.translateTimeToDate(DateUtil.getLastDaysTimestamp(1), DateUtil.FORMAT_ENUM.NOSEGMENTATION_yMd.getValue());
|
||||
List<String> fileNames = Arrays.asList(
|
||||
templateName,
|
||||
translateTimeToDate,
|
||||
"00",
|
||||
DateUtil.translateTimeToDate(System.currentTimeMillis(), DateUtil.FORMAT.NOSEGMENTATION_yMdHms),
|
||||
DateUtil.translateTimeToDate(System.currentTimeMillis(), DateUtil.FORMAT_ENUM.NOSEGMENTATION_yMdHms.getValue()),
|
||||
HttpCommonUtil.hostName,
|
||||
paramsNum
|
||||
);
|
||||
|
@ -297,14 +297,14 @@ public class FileUtil {
|
|||
|
||||
public static String getLogFileName(String templateName, String paramsNum, String date_format, int date_num) throws Exception{
|
||||
if (StringUtils.isEmpty(date_format)){
|
||||
date_format = DateUtil.FORMAT.NOSEGMENTATION_yMdHms;
|
||||
date_format = DateUtil.FORMAT_ENUM.NOSEGMENTATION_yMdHms.getValue();
|
||||
}
|
||||
String translateTimeToDate = DateUtil.translateTimeToDate(DateUtil.getLastDaysTimestamp(date_num), date_format);
|
||||
List<String> fileNames = Arrays.asList(
|
||||
templateName,
|
||||
translateTimeToDate,
|
||||
"00",
|
||||
DateUtil.translateTimeToDate(System.currentTimeMillis(), DateUtil.FORMAT.NOSEGMENTATION_yMdHmsS),
|
||||
DateUtil.translateTimeToDate(System.currentTimeMillis(), DateUtil.FORMAT_ENUM.NOSEGMENTATION_yMdHmsS.getValue()),
|
||||
HttpCommonUtil.hostName,
|
||||
paramsNum
|
||||
);
|
||||
|
|
|
@ -37,13 +37,15 @@ public class HttpCommonUtil {
|
|||
ip = request.getRemoteAddr();
|
||||
if(ip.equals("127.0.0.1")){
|
||||
//根据网卡取本机配置的IP
|
||||
InetAddress inet=null;
|
||||
InetAddress interNet=null;
|
||||
try {
|
||||
inet = InetAddress.getLocalHost();
|
||||
interNet = InetAddress.getLocalHost();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
ip= inet.getHostAddress();
|
||||
if (interNet != null){
|
||||
ip= interNet.getHostAddress();
|
||||
}
|
||||
}
|
||||
}
|
||||
// 多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割
|
||||
|
@ -60,10 +62,11 @@ public class HttpCommonUtil {
|
|||
InetAddress address = null;
|
||||
try {
|
||||
address = InetAddress.getLocalHost();
|
||||
return address.getHostAddress();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return address.getHostAddress();
|
||||
return null;
|
||||
}
|
||||
|
||||
//获取本地机器名
|
||||
|
@ -75,10 +78,11 @@ public class HttpCommonUtil {
|
|||
InetAddress address = null;
|
||||
try {
|
||||
address = InetAddress.getLocalHost();
|
||||
return address.getHostName();
|
||||
} catch (UnknownHostException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return address.getHostName();
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,10 +21,10 @@ public class RestTemplateUtil {
|
|||
|
||||
private RestTemplate restTemplate;
|
||||
|
||||
@Value("${restTemplate.remote.alarm.url.email}")
|
||||
@Value("${restTemplate.remote.alarm.url.email:''}")
|
||||
private String alarmEmailUrl = "";
|
||||
|
||||
@Value("${restTemplate.remote.alarm.url.sms}")
|
||||
@Value("${restTemplate.remote.alarm.url.sms:''}")
|
||||
private String alarmSMSUrl = "";
|
||||
|
||||
public void setRestTemplate(RestTemplate restTemplate) {
|
||||
|
|
|
@ -1,254 +0,0 @@
|
|||
package site.cnkj.common.utils.http;
|
||||
|
||||
import ch.ethz.ssh2.*;
|
||||
import ch.ethz.ssh2.auth.AgentProxy;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.Objects;
|
||||
|
||||
/*
|
||||
* @version 1.0 created by LXW on 2019/12/5 14:35
|
||||
*/
|
||||
public class SSH2Util {
|
||||
|
||||
private static String DEFAULT_CHARTSET = "UTF-8";
|
||||
private static Connection connection;
|
||||
|
||||
@Data
|
||||
public static class ConnectEntity{
|
||||
/**
|
||||
* the hostname of the SSH-2 server.
|
||||
*/
|
||||
String hostname;
|
||||
/**
|
||||
* port on the server, normally 22.
|
||||
*/
|
||||
int port = 22;
|
||||
/**
|
||||
* Allows you to set a custom "softwareversion" string as defined in RFC 4253.
|
||||
* <b>NOTE: As per the RFC, the "softwareversion" string MUST consist of printable
|
||||
* US-ASCII characters, with the exception of whitespace characters and the minus sign (-).</b>
|
||||
*/
|
||||
@Nullable String softwareversion = null;
|
||||
@Nullable HTTPProxyData proxy = null;
|
||||
/**
|
||||
* A <code>String</code> holding the username.
|
||||
*/
|
||||
String username;
|
||||
/**
|
||||
* 1. The password to login in.
|
||||
* 2. If the PEM structure is encrypted ("Proc-Type: 4,ENCRYPTED") then
|
||||
* you must specify a password. Otherwise, this argument will be ignored
|
||||
* and can be set to <code>null</code>.
|
||||
* 3. If the PEM file is encrypted then you must specify the password.
|
||||
* Otherwise, this argument will be ignored and can be set to <code>null</code>.
|
||||
*/
|
||||
@Nullable String password = null;
|
||||
@Nullable AgentProxy au_proxy = null;
|
||||
/**
|
||||
* An <code>InteractiveCallback</code> which will be used to determine the responses to the questions asked by the server.
|
||||
*/
|
||||
@Nullable InteractiveCallback cb = null;
|
||||
/**
|
||||
* An array of submethod names, see
|
||||
* draft-ietf-secsh-auth-kbdinteract-XX. May be <code>null</code>
|
||||
* to indicate an empty list.
|
||||
*/
|
||||
@Nullable String[] submethods = null;
|
||||
/**
|
||||
* A <code>char[]</code> containing a DSA or RSA private key of the
|
||||
* user in OpenSSH key format (PEM, you can't miss the
|
||||
* "-----BEGIN DSA PRIVATE KEY-----" or "-----BEGIN RSA PRIVATE KEY-----"
|
||||
* tag). The char array may contain linebreaks/linefeeds.
|
||||
*/
|
||||
@Nullable char[] pemPrivateKey = null;
|
||||
/**
|
||||
* A <code>File</code> object pointing to a file containing a DSA or RSA
|
||||
* private key of the user in OpenSSH key format (PEM, you can't miss the
|
||||
* "-----BEGIN DSA PRIVATE KEY-----" or "-----BEGIN RSA PRIVATE KEY-----"
|
||||
* tag).
|
||||
*/
|
||||
@Nullable File pemFile = null;
|
||||
}
|
||||
|
||||
private static String toString(InputStream inputStream){
|
||||
InputStream stream = new StreamGobbler(inputStream);
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
try {
|
||||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(stream, DEFAULT_CHARTSET));
|
||||
while (true){
|
||||
String line = bufferedReader.readLine();
|
||||
if (StringUtils.isEmpty(line)){
|
||||
break;
|
||||
}
|
||||
stringBuffer.append(line+"\n");
|
||||
}
|
||||
return stringBuffer.toString();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remote login to server with username and password.
|
||||
* @param connectEntity Connection entity class
|
||||
* @return Connection
|
||||
*/
|
||||
public static Connection login(ConnectEntity connectEntity){
|
||||
try {
|
||||
//create connection
|
||||
if (connectEntity.getProxy() == null && StringUtils.isEmpty(connectEntity.getSoftwareversion())){
|
||||
connection = new Connection(connectEntity.getHostname(), connectEntity.getPort());
|
||||
}else if (connectEntity.getProxy() != null && StringUtils.isEmpty(connectEntity.getSoftwareversion())){
|
||||
connection = new Connection(connectEntity.getHostname(), connectEntity.getPort(), connectEntity.getProxy());
|
||||
}else if (connectEntity.getProxy() != null && StringUtils.isNotEmpty(connectEntity.getSoftwareversion())){
|
||||
connection = new Connection(connectEntity.getHostname(), connectEntity.getPort(), connectEntity.getSoftwareversion(), connectEntity.getProxy());
|
||||
}else if (connectEntity.getProxy() == null && StringUtils.isNotEmpty(connectEntity.getSoftwareversion())){
|
||||
connection = new Connection(connectEntity.getHostname(), connectEntity.getPort(), connectEntity.getSoftwareversion());
|
||||
}
|
||||
connection.connect();
|
||||
//authenticate
|
||||
boolean authenticate = false;
|
||||
if (StringUtils.isEmpty(connectEntity.getPassword()) && connectEntity.getAu_proxy() == null && connectEntity.getCb() == null && connectEntity.getSubmethods() == null && connectEntity.getPemPrivateKey() == null && connectEntity.getPemFile() == null){
|
||||
authenticate = connection.authenticateWithNone(connectEntity.getUsername());
|
||||
}else if (StringUtils.isEmpty(connectEntity.getPassword()) && connectEntity.getAu_proxy() == null && connectEntity.getCb() != null && connectEntity.getSubmethods() == null && connectEntity.getPemPrivateKey() == null && connectEntity.getPemFile() == null){
|
||||
authenticate = connection.authenticateWithKeyboardInteractive(connectEntity.getUsername(), connectEntity.getCb());
|
||||
}else if (StringUtils.isEmpty(connectEntity.getPassword()) && connectEntity.getAu_proxy() == null && connectEntity.getCb() != null && connectEntity.getSubmethods() != null && connectEntity.getPemPrivateKey() == null && connectEntity.getPemFile() == null){
|
||||
authenticate = connection.authenticateWithKeyboardInteractive(connectEntity.getUsername(), connectEntity.getSubmethods(), connectEntity.getCb());
|
||||
}else if (StringUtils.isEmpty(connectEntity.getPassword()) && connectEntity.getAu_proxy() != null && connectEntity.getCb() == null && connectEntity.getSubmethods() == null && connectEntity.getPemPrivateKey() == null && connectEntity.getPemFile() == null){
|
||||
authenticate = connection.authenticateWithAgent(connectEntity.getUsername(), connectEntity.getAu_proxy());
|
||||
}else if (StringUtils.isNotEmpty(connectEntity.getPassword()) && connectEntity.getAu_proxy() == null && connectEntity.getCb() == null && connectEntity.getSubmethods() == null && connectEntity.getPemPrivateKey() == null && connectEntity.getPemFile() == null){
|
||||
authenticate = connection.authenticateWithPassword(connectEntity.getUsername(), connectEntity.getPassword());
|
||||
}else if (connectEntity.getAu_proxy() == null && connectEntity.getCb() == null && connectEntity.getSubmethods() == null && connectEntity.getPemPrivateKey() != null && connectEntity.getPemFile() == null){
|
||||
authenticate = connection.authenticateWithPublicKey(connectEntity.getUsername(), connectEntity.getPemPrivateKey(), connectEntity.getPassword());
|
||||
}else if (connectEntity.getAu_proxy() == null && connectEntity.getCb() == null && connectEntity.getSubmethods() == null && connectEntity.getPemPrivateKey() == null && connectEntity.getPemFile() != null){
|
||||
authenticate = connection.authenticateWithPublicKey(connectEntity.getUsername(), connectEntity.getPemFile(), connectEntity.getPassword());
|
||||
}
|
||||
if (!authenticate){
|
||||
throw new RuntimeException("Failed to verify login");
|
||||
}
|
||||
return connection;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute script.
|
||||
* NOTE: If result is empty or null, it will be throw.
|
||||
* WARN: If it is not a command that comes with Linux, there may be unrecognized problems.
|
||||
* For Example: ll: command not found, even it can be used in your servers.
|
||||
* @param connection Connection object
|
||||
* @param cmd script
|
||||
* @return Results of the script
|
||||
*/
|
||||
public static String execute(Connection connection, String cmd){
|
||||
try {
|
||||
Session session = connection.openSession();
|
||||
session.execCommand(cmd, DEFAULT_CHARTSET);
|
||||
String out = toString(session.getStdout());
|
||||
if (StringUtils.isEmpty(out)){
|
||||
throw new RuntimeException("Execution failed, return value is NULL."+toString(session.getStderr()));
|
||||
}
|
||||
session.close();
|
||||
connection.close();
|
||||
return out;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload file to the specified path on the remote server by use scp.
|
||||
* @param connection Connection object
|
||||
* @param local Local file
|
||||
* @param remote Remote directory path
|
||||
* @return result of upload
|
||||
*/
|
||||
public static Boolean upload(Connection connection, File local, String remote){
|
||||
try {
|
||||
SCPClient scpClient = new SCPClient(connection);
|
||||
SCPOutputStream scpOutputStream = scpClient.put(local.getName(), local.length(), remote, "0600");
|
||||
scpOutputStream.close();
|
||||
connection.close();
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch upload files to the specified path on the specified server.
|
||||
* @param connection connection Connection object
|
||||
* @param local local directory path or file path
|
||||
* @param remote remote directory path
|
||||
* @return result of upload
|
||||
*/
|
||||
public static Boolean batchUpload(Connection connection, String local, String remote){
|
||||
try {
|
||||
File localDir = new File(local);
|
||||
if (localDir.isFile()){
|
||||
return upload(connection, localDir, remote);
|
||||
}else if (localDir.isDirectory()){
|
||||
for (File file : Objects.requireNonNull(localDir.listFiles())) {
|
||||
upload(connection, file, remote);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Download file to local from remote server.
|
||||
* @param connection Connection object
|
||||
* @param local local file path
|
||||
* @param remote remote file path
|
||||
* @return result for download
|
||||
*/
|
||||
public static Boolean download(Connection connection, String local, String remote){
|
||||
FileOutputStream fileOutputStream = null;
|
||||
try {
|
||||
SCPClient scpClient = new SCPClient(connection);
|
||||
SCPInputStream scpInputStream = scpClient.get(remote);
|
||||
File localFile = new File(local);
|
||||
if (!localFile.getParentFile().exists()){
|
||||
localFile.getParentFile().mkdirs();
|
||||
}
|
||||
fileOutputStream = new FileOutputStream(localFile);
|
||||
byte[] b = new byte[1024];
|
||||
while (true){
|
||||
int read = scpInputStream.read(b);
|
||||
if (read == -1){
|
||||
break;
|
||||
}
|
||||
fileOutputStream.write(b, 0, read);
|
||||
}
|
||||
fileOutputStream.flush();
|
||||
scpInputStream.close();
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
if (fileOutputStream != null){
|
||||
fileOutputStream.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
connection.close();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
|
@ -84,10 +84,12 @@ public class RSAEncrypt {
|
|||
} catch (NoSuchAlgorithmException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
keyPairGen.initialize(1024, new SecureRandom());
|
||||
KeyPair keyPair= keyPairGen.generateKeyPair();
|
||||
this.privateKey= (RSAPrivateKey) keyPair.getPrivate();
|
||||
this.publicKey= (RSAPublicKey) keyPair.getPublic();
|
||||
if (keyPairGen != null){
|
||||
keyPairGen.initialize(1024, new SecureRandom());
|
||||
KeyPair keyPair= keyPairGen.generateKeyPair();
|
||||
this.privateKey= (RSAPrivateKey) keyPair.getPrivate();
|
||||
this.publicKey= (RSAPublicKey) keyPair.getPublic();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -184,4 +184,15 @@ public class StringUtil {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static String CapitalizeFirstLetter(String input){
|
||||
try {
|
||||
char[] chars = input.toCharArray();
|
||||
chars[0]-=32;
|
||||
return String.valueOf(chars);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ import site.cnkj.common.utils.io.StringUtil;
|
|||
/*
|
||||
* @version 1.0 created by LXW on 2019/4/1 9:13
|
||||
*/
|
||||
@Deprecated
|
||||
@Component
|
||||
public class LoggerUtil {
|
||||
|
||||
|
@ -62,8 +63,8 @@ public class LoggerUtil {
|
|||
@Data
|
||||
public static class MonitorEntity {
|
||||
private String hostName = HttpCommonUtil.getLocalHostName();//机器名
|
||||
private String timestamp = DateUtil.translateTimeToDate(DateUtil.getCurrentTime(), DateUtil.FORMAT.FULLTIMEBY_yMdHmsS);//时间
|
||||
private String time = DateUtil.translateTimeToDate(DateUtil.getCurrentTime(), DateUtil.FORMAT.FULLTIMEBY_yMdHmsS);//时间
|
||||
private String timestamp = DateUtil.translateTimeToDate(DateUtil.getCurrentTime(), DateUtil.FORMAT_ENUM.FULLTIMEBY_yMdHmsS.getValue());//时间
|
||||
private String time = DateUtil.translateTimeToDate(DateUtil.getCurrentTime(), DateUtil.FORMAT_ENUM.FULLTIMEBY_yMdHmsS.getValue());//时间
|
||||
private String level;//级别
|
||||
@Nullable private String status;//状态枚举值
|
||||
@Nullable private String type;//类型
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
package site.cnkj.utils;
|
||||
|
||||
import com.mongodb.*;
|
||||
import com.mongodb.client.MongoCursor;
|
||||
import com.mongodb.client.MongoDatabase;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.bson.Document;
|
||||
import site.cnkj.common.utils.io.DES;
|
||||
import site.cnkj.common.utils.io.RSAEncrypt;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public class CommonApplicationTests {
|
||||
|
||||
private static final String DEFAULT_PUBLIC_KEY=
|
||||
|
@ -83,4 +92,59 @@ public class CommonApplicationTests {
|
|||
}
|
||||
}
|
||||
|
||||
private static HashMap<String, MongoDatabase> mongoClientDatabases = new HashMap<>();
|
||||
|
||||
private static String getDatabase(String url) {
|
||||
String databaseName = "";
|
||||
String substring = url.substring(10, url.length());
|
||||
String[] split = substring.split("/");
|
||||
String database = split[1];
|
||||
if (database.contains("?")){
|
||||
databaseName = database.split("\\?")[0];
|
||||
}else {
|
||||
databaseName = database;
|
||||
}
|
||||
return databaseName;
|
||||
}
|
||||
|
||||
private static List<ServerAddress> createServerAddress(String url){
|
||||
List<ServerAddress> serverAddresses = new ArrayList<>();
|
||||
String substring = url.substring(10, url.length());
|
||||
String[] split = substring.split("/");
|
||||
String[] hosts = split[0].split(",", -1);
|
||||
for (String host : hosts) {
|
||||
if (StringUtils.isNotEmpty(host)){
|
||||
String[] strings = host.split(":", -1);
|
||||
ServerAddress serverAddress = new ServerAddress(strings[0], Integer.valueOf(strings[1]));
|
||||
serverAddresses.add(serverAddress);
|
||||
}
|
||||
}
|
||||
return serverAddresses;
|
||||
}
|
||||
|
||||
private static void test3(){
|
||||
String url = "mongodb://10.25.245.121:17017/log_storage_stable?connectTimeoutMS=50&maxPoolSize=5&waitQueueTimeoutMS=100&socketTimeoutMS=1000&maxIdleTimeMS=60000";
|
||||
try {
|
||||
//配制连接池
|
||||
MongoClientOptions.Builder mongoClientBuilder = new MongoClientOptions.Builder();
|
||||
mongoClientBuilder.connectionsPerHost(30);
|
||||
mongoClientBuilder.connectTimeout(30000);
|
||||
mongoClientBuilder.retryWrites(true);
|
||||
//MongoClientOptions mongoClientOptions = mongoClientBuilder.build();
|
||||
|
||||
MongoClient mongoClient = new MongoClient(new MongoClientURI(url, mongoClientBuilder));
|
||||
MongoDatabase mongoClientDatabase = mongoClient.getDatabase(getDatabase(url));
|
||||
MongoCursor<Document> cursor = mongoClientDatabase.getCollection("a_10000_00062").find().limit(10).iterator();
|
||||
while (cursor.hasNext()){
|
||||
System.out.println(cursor.next().toJson());
|
||||
}
|
||||
}catch (MongoClientException e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
test3();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user