Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
D
data-server
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
licc
data-server
Commits
61aa4fd2
Commit
61aa4fd2
authored
Mar 04, 2021
by
licc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
f58ca20c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
9 deletions
+43
-9
pom.xml
wisenergy-common/pom.xml
+33
-2
DateUtil.java
...mon/src/main/java/cn/wisenergy/common/utils/DateUtil.java
+1
-1
FileUtil.java
...mon/src/main/java/cn/wisenergy/common/utils/FileUtil.java
+1
-1
HttpUtil.java
...mon/src/main/java/cn/wisenergy/common/utils/HttpUtil.java
+6
-2
ShareCodeUtil.java
...rc/main/java/cn/wisenergy/common/utils/ShareCodeUtil.java
+2
-3
No files found.
wisenergy-common/pom.xml
View file @
61aa4fd2
...
...
@@ -158,11 +158,13 @@
<artifactId>
hutool-all
</artifactId>
<version>
4.6.17
</version>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
</dependency>
<dependency>
<groupId>
com.aliyun
</groupId>
<artifactId>
aliyun-java-sdk-core
</artifactId>
<version>
RELEASE
</version>
<scope>
compile
</scope>
</dependency>
<!-- 阿里短信依赖-->
<dependency>
...
...
@@ -170,6 +172,35 @@
<artifactId>
aliyun-java-sdk-core
</artifactId>
<version>
4.4.0
</version>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-lang3
</artifactId>
<version>
3.11
</version>
</dependency>
<dependency>
<groupId>
commons-lang
</groupId>
<artifactId>
commons-lang
</artifactId>
<version>
2.6
</version>
</dependency>
<dependency>
<groupId>
commons-io
</groupId>
<artifactId>
commons-io
</artifactId>
</dependency>
<dependency>
<groupId>
cn.hutool
</groupId>
<artifactId>
hutool-all
</artifactId>
<version>
4.6.17
</version>
</dependency>
<!-- 视频获取第一帧 -->
<dependency>
<groupId>
org.bytedeco
</groupId>
<artifactId>
javacv
</artifactId>
</dependency>
</dependencies>
<!-- MAVEN构建 -->
...
...
wisenergy-common/src/main/java/cn/wisenergy/common/utils/DateUtil.java
View file @
61aa4fd2
package
cn
.
wisenergy
.
common
.
utils
;
import
com.alibaba.druid.util.StringUtils
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
import
java.text.ParseException
;
...
...
wisenergy-common/src/main/java/cn/wisenergy/common/utils/FileUtil.java
View file @
61aa4fd2
package
cn
.
wisenergy
.
common
.
utils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.exception.ExceptionUtils
;
import
org.apache.commons.lang
3
.exception.ExceptionUtils
;
import
org.apache.http.HttpResponse
;
import
org.apache.http.HttpStatus
;
import
org.apache.http.client.methods.HttpGet
;
...
...
wisenergy-common/src/main/java/cn/wisenergy/common/utils/HttpUtil.java
View file @
61aa4fd2
package
cn
.
wisenergy
.
common
.
utils
;
import
com.alibaba.fastjson.JSONObject
;
import
org.apache.commons.beanutils.ConvertUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.exception.ExceptionUtils
;
import
org.apache.http.HttpEntity
;
import
org.apache.http.HttpResponse
;
import
org.apache.http.NameValuePair
;
...
...
@@ -20,7 +23,6 @@ import org.apache.http.impl.client.CloseableHttpClient;
import
org.apache.http.impl.client.HttpClients
;
import
org.apache.http.message.BasicNameValuePair
;
import
org.apache.http.util.EntityUtils
;
import
org.apache.http.util.ExceptionUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.util.Assert
;
...
...
@@ -42,6 +44,8 @@ import java.util.Set;
public
class
HttpUtil
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
HttpUtil
.
class
);
private
static
final
int
TIME_OUT
=
60000
;
private
static
RequestConfig
.
Builder
requestConfigBuilder
=
null
;
...
...
@@ -63,7 +67,7 @@ public class HttpUtil {
SSLConnectionSocketFactory
sslsf
=
new
SSLConnectionSocketFactory
(
sslContext
);
return
HttpClients
.
custom
().
setDefaultRequestConfig
(
getDefaultRequestConfig
()).
setSSLSocketFactory
(
sslsf
).
build
();
}
catch
(
KeyManagementException
e
)
{
log
.
error
(
"创建SSLClientDefault失败:{}"
,
ExceptionUtils
.
initCause
(
e
,
e
));
log
.
error
(
"创建SSLClientDefault失败:{}"
,
ExceptionUtils
.
getFullStackTrace
(
e
));
}
catch
(
NoSuchAlgorithmException
e
)
{
log
.
error
(
"创建SSLClientDefault失败:{}"
+
ExceptionUtils
.
getFullStackTrace
(
e
));
}
catch
(
KeyStoreException
e
)
{
...
...
wisenergy-common/src/main/java/cn/wisenergy/common/utils/ShareCodeUtil.java
View file @
61aa4fd2
package
cn
.
wisenergy
.
common
.
utils
;
import
org.apache.log4j.Logger
;
import
lombok.extern.slf4j.Slf4j
;
/**
*
* @author zen.wang zenyes@gmail.com
*/
@Slf4j
public
class
ShareCodeUtil
{
/** 自定义进制(0,1没有加入,容易与o,l混淆) */
...
...
@@ -15,8 +16,6 @@ public class ShareCodeUtil {
/** 进制长度 */
private
static
final
int
binLen
=
r
.
length
;
private
static
Logger
logger
=
Logger
.
getLogger
(
ShareCodeUtil
.
class
);
private
static
final
long
startNumber
=
100048576L
;
// private static final long startNumber = 0L;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment