mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-29 05:09:46 +01:00
delete:删除未用到的代码
This commit is contained in:
parent
27dbae7047
commit
817c108874
3 changed files with 0 additions and 68 deletions
|
|
@ -168,12 +168,6 @@
|
|||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.ulisesbocchio</groupId>
|
||||
<artifactId>jasypt-spring-boot-starter</artifactId>
|
||||
<version>3.0.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<!-- 阿里云maven仓库 -->
|
||||
|
|
|
|||
|
|
@ -1,32 +0,0 @@
|
|||
package xiaozhi;
|
||||
import org.jasypt.encryption.StringEncryptor;
|
||||
// 如果使用 JUnit 5
|
||||
import org.junit.jupiter.api.Test;
|
||||
// 如果使用 JUnit 4,需要确保项目中添加了 JUnit 4 的依赖
|
||||
// import org.junit.Test;
|
||||
// 由于原导入语句无法解析,若使用 JUnit 5,移除该导入
|
||||
// 若后续代码需要使用 JUnit 4 的 @RunWith 注解,需确保项目添加 JUnit 4 依赖
|
||||
// 这里假设使用 JUnit 5,移除该导入
|
||||
// import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
// import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
/**
|
||||
* 单元测试
|
||||
*/
|
||||
// 由于原代码使用了 JUnit 5 的导入,这里移除 JUnit 4 的 @RunWith 注解
|
||||
// 若后续需要使用 JUnit 4 的功能,需确保项目添加 JUnit 4 依赖
|
||||
// @RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
public class DbEncTest {
|
||||
|
||||
@Autowired
|
||||
StringEncryptor stringEncryptor;
|
||||
|
||||
@Test
|
||||
public void jiami() {
|
||||
System.out.println("username:" + stringEncryptor.encrypt("07e43e8d669fb946e31ccd4ef5f32c9f2287619c79b766a5985d2c99ad7b7c7e"));
|
||||
System.out.println("password:" + stringEncryptor.encrypt("042e94093fd2c2765ea45cf13ddbfd38e93026df4b6d5e4206ea5ac90956d63ab73e8b82c6daf7829f9aea7e27e1db5bb0a90944c4c4985af44db0ef49c46d6ad6"));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
package xiaozhi;
|
||||
|
||||
import xiaozhi.common.redis.RedisUtils;
|
||||
import xiaozhi.modules.sys.entity.SysUserEntity;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
// 若使用 JUnit 5,应导入以下包
|
||||
import org.junit.jupiter.api.Test;
|
||||
// 由于代码中使用了 JUnit 5 的 @Test 注解,应移除 JUnit 4 的 @RunWith 相关导入
|
||||
// import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
// 由于代码中使用了 JUnit 5 的 @Test 注解,应移除 JUnit 4 的 @RunWith 相关代码
|
||||
// @RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
public class RedisTest {
|
||||
@Resource
|
||||
private RedisUtils redisUtils;
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
SysUserEntity user = new SysUserEntity();
|
||||
user.setEmail("123456@qq.com");
|
||||
redisUtils.set("user", user);
|
||||
|
||||
System.out.println(ToStringBuilder.reflectionToString(redisUtils.get("user")));
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in a new issue