1
0
mirror of synced 2026-05-22 14:43:15 +00:00

sa-token springboot集成包 单元测试

This commit is contained in:
click33
2022-02-09 20:59:37 +08:00
parent aac6ef9a3b
commit 62acc8e852
9 changed files with 41 additions and 29 deletions
@@ -33,13 +33,6 @@
<version>${sa-token-version}</version>
<optional>true</optional>
</dependency>
<!-- test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>2.0.0.RELEASE</version>
<scope>test</scope>
</dependency>
<!-- config -->
<dependency>
<groupId>org.springframework.boot</groupId>
@@ -1,21 +0,0 @@
package cn.dev33.satoken.secure;
import org.junit.Assert;
import org.junit.Test;
/**
* BCrypt 加密测试
*
* @author dream.
* @date 2022/1/20
**/
public class BCryptTest {
@Test
public void checkpwTest() {
final String hashed = BCrypt.hashpw("12345");
System.out.println(hashed);
Assert.assertTrue(BCrypt.checkpw("12345", hashed));
Assert.assertFalse(BCrypt.checkpw("123456", hashed));
}
}
+1
View File
@@ -20,6 +20,7 @@
<!-- 所有子模块 -->
<modules>
<module>sa-token-core-test</module>
<module>sa-token-springboot-test</module>
</modules>
<dependencies>
@@ -0,0 +1,12 @@
target/
node_modules/
bin/
.settings/
unpackage/
.classpath
.project
.factorypath
.idea/
@@ -0,0 +1,28 @@
<?xml version='1.0' encoding='utf-8'?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-test</artifactId>
<version>1.28.0</version>
</parent>
<packaging>jar</packaging>
<name>sa-token-springboot-test</name>
<artifactId>sa-token-springboot-test</artifactId>
<description>sa-token-springboot-test</description>
<dependencies>
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-spring-boot-starter</artifactId>
<version>${sa-token-version}</version>
</dependency>
</dependencies>
</project>
@@ -24,7 +24,6 @@ import cn.dev33.satoken.util.SaTokenConsts;
/**
* Sa-Token 基础API测试
*
* <p> 注解详解参考 https://www.cnblogs.com/flypig666/p/11505277.html
* @author Auster
*
*/