Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
b2f3b14d
Commit
b2f3b14d
authored
Apr 18, 2020
by
邓实川
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
maven仓库优化,测试
parent
8fec6aaa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
15 deletions
+22
-15
pom.xml
+9
-3
src/main/java/cn/timer/api/utils/Encrypt.java
+6
-6
src/main/java/cn/timer/api/utils/Md5.java
+5
-5
src/main/resources/application-dev.yml
+2
-1
No files found.
pom.xml
View file @
b2f3b14d
...
@@ -82,6 +82,7 @@
...
@@ -82,6 +82,7 @@
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
<scope>
provided
</scope>
</dependency>
</dependency>
<!-- <dependency>
<!-- <dependency>
<groupId>org.springframework.boot</groupId>
<groupId>org.springframework.boot</groupId>
...
@@ -193,17 +194,17 @@
...
@@ -193,17 +194,17 @@
<artifactId>
commons-lang3
</artifactId>
<artifactId>
commons-lang3
</artifactId>
</dependency>
</dependency>
<dependency>
<!-- Apache shiro -->
<!-- <dependency>
<groupId>org.apache.shiro</groupId>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
<artifactId>shiro-spring</artifactId>
<version>${shiro.version}</version>
<version>${shiro.version}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-ehcache</artifactId>
<artifactId>shiro-ehcache</artifactId>
<version>${shiro.version}</version>
<version>${shiro.version}</version>
</dependency>
</dependency>
-->
<!-- redis starter -->
<!-- redis starter -->
<!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId>
<!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId>
...
@@ -431,6 +432,11 @@
...
@@ -431,6 +432,11 @@
<overwrite>
true
</overwrite>
<overwrite>
true
</overwrite>
</configuration>
</configuration>
</plugin>
</plugin>
<plugin>
<groupId>
pl.project13.maven
</groupId>
<artifactId>
git-commit-id-plugin
</artifactId>
</plugin>
</plugins>
</plugins>
</build>
</build>
...
...
src/main/java/cn/timer/api/utils/Encrypt.java
View file @
b2f3b14d
...
@@ -2,7 +2,7 @@ package cn.timer.api.utils;
...
@@ -2,7 +2,7 @@ package cn.timer.api.utils;
import
java.io.UnsupportedEncodingException
;
import
java.io.UnsupportedEncodingException
;
import
org.apache.shiro.crypto.hash.SimpleHash
;
//
import org.apache.shiro.crypto.hash.SimpleHash;
/**
/**
*
*
...
@@ -30,11 +30,11 @@ public class Encrypt {
...
@@ -30,11 +30,11 @@ public class Encrypt {
* @param salt
* @param salt
* @return
* @return
*/
*/
public
static
String
md5
(
String
password
,
String
salt
)
{
//
public static String md5(String password, String salt) {
//
Object
tokenCredentials
=
new
SimpleHash
(
"md5"
,
password
,
salt
,
2
).
toHex
();
//
Object tokenCredentials = new SimpleHash("md5", password, salt, 2).toHex();
return
(
String
)
tokenCredentials
;
//
return (String) tokenCredentials;
}
//
}
public
static
String
myEncode
(
String
str
)
throws
UnsupportedEncodingException
{
public
static
String
myEncode
(
String
str
)
throws
UnsupportedEncodingException
{
byte
[]
strBytes
=
str
.
getBytes
(
"utf-8"
);
byte
[]
strBytes
=
str
.
getBytes
(
"utf-8"
);
...
...
src/main/java/cn/timer/api/utils/Md5.java
View file @
b2f3b14d
...
@@ -4,7 +4,7 @@ import java.math.BigInteger;
...
@@ -4,7 +4,7 @@ import java.math.BigInteger;
import
java.security.MessageDigest
;
import
java.security.MessageDigest
;
import
java.security.NoSuchAlgorithmException
;
import
java.security.NoSuchAlgorithmException
;
import
org.apache.shiro.crypto.hash.SimpleHash
;
//
import org.apache.shiro.crypto.hash.SimpleHash;
/**
/**
*
*
...
@@ -16,10 +16,10 @@ import org.apache.shiro.crypto.hash.SimpleHash;
...
@@ -16,10 +16,10 @@ import org.apache.shiro.crypto.hash.SimpleHash;
*/
*/
public
class
Md5
{
public
class
Md5
{
public
static
String
md5password
(
String
name
,
String
password
)
{
//
public static String md5password(String name, String password) {
Object
tokenCredentials
=
new
SimpleHash
(
"md5"
,
password
,
name
,
56
).
toHex
();
//
Object tokenCredentials = new SimpleHash("md5", password, name, 56).toHex();
return
(
String
)
tokenCredentials
;
//
return (String) tokenCredentials;
}
//
}
// 写一个md5加密的方法
// 写一个md5加密的方法
public
static
String
md5
(
String
plainText
)
{
public
static
String
md5
(
String
plainText
)
{
...
...
src/main/resources/application-dev.yml
View file @
b2f3b14d
...
@@ -104,8 +104,9 @@ info:
...
@@ -104,8 +104,9 @@ info:
encoding
:
'
@project.build.sourceEncoding@'
encoding
:
'
@project.build.sourceEncoding@'
java
:
java
:
version
:
'
@java.version@'
version
:
'
@java.version@'
git
:
mode
:
full
##############################
##############################
# mybatis-plus
# mybatis-plus
mybatis-plus
:
mybatis-plus
:
mapper-locations
:
classpath:mapping/**/*Mapper.xml
# dao到xml文件映射
mapper-locations
:
classpath:mapping/**/*Mapper.xml
# dao到xml文件映射
...
...
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