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
d715a013
Commit
d715a013
authored
Apr 18, 2020
by
邓实川
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
maven仓库优化,测试
parent
910c3b0a
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 @
d715a013
...
...
@@ -82,6 +82,7 @@
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
<scope>
provided
</scope>
</dependency>
<!-- <dependency>
<groupId>org.springframework.boot</groupId>
...
...
@@ -193,17 +194,17 @@
<artifactId>
commons-lang3
</artifactId>
</dependency>
<dependency>
<!-- Apache shiro -->
<!-- <dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
<version>${shiro.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-ehcache</artifactId>
<version>${shiro.version}</version>
</dependency>
</dependency>
-->
<!-- redis starter -->
<!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId>
...
...
@@ -431,6 +432,11 @@
<overwrite>
true
</overwrite>
</configuration>
</plugin>
<plugin>
<groupId>
pl.project13.maven
</groupId>
<artifactId>
git-commit-id-plugin
</artifactId>
</plugin>
</plugins>
</build>
...
...
src/main/java/cn/timer/api/utils/Encrypt.java
View file @
d715a013
...
...
@@ -2,7 +2,7 @@ package cn.timer.api.utils;
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 {
* @param salt
* @return
*/
public
static
String
md5
(
String
password
,
String
salt
)
{
Object
tokenCredentials
=
new
SimpleHash
(
"md5"
,
password
,
salt
,
2
).
toHex
();
return
(
String
)
tokenCredentials
;
}
//
public static String md5(String password, String salt) {
//
//
Object tokenCredentials = new SimpleHash("md5", password, salt, 2).toHex();
//
return (String) tokenCredentials;
//
}
public
static
String
myEncode
(
String
str
)
throws
UnsupportedEncodingException
{
byte
[]
strBytes
=
str
.
getBytes
(
"utf-8"
);
...
...
src/main/java/cn/timer/api/utils/Md5.java
View file @
d715a013
...
...
@@ -4,7 +4,7 @@ import java.math.BigInteger;
import
java.security.MessageDigest
;
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;
*/
public
class
Md5
{
public
static
String
md5password
(
String
name
,
String
password
)
{
Object
tokenCredentials
=
new
SimpleHash
(
"md5"
,
password
,
name
,
56
).
toHex
();
return
(
String
)
tokenCredentials
;
}
//
public static String md5password(String name, String password) {
//
Object tokenCredentials = new SimpleHash("md5", password, name, 56).toHex();
//
return (String) tokenCredentials;
//
}
// 写一个md5加密的方法
public
static
String
md5
(
String
plainText
)
{
...
...
src/main/resources/application-dev.yml
View file @
d715a013
...
...
@@ -104,8 +104,9 @@ info:
encoding
:
'
@project.build.sourceEncoding@'
java
:
version
:
'
@java.version@'
git
:
mode
:
full
##############################
# mybatis-plus
mybatis-plus
:
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