升级springboot4兼容问题

This commit is contained in:
JEECG 2026-07-07 14:22:41 +08:00
parent a78496338d
commit 71008562db
3 changed files with 25 additions and 17 deletions

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>jeecg-module-system</artifactId>
<groupId>org.jeecgframework.boot3</groupId>
<version>3.9.2</version>
<version>3.9.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -51,7 +51,7 @@
<!-- <dependency>
<groupId>org.jeecgframework.boot3</groupId>
<artifactId>jeecg-cloud-test-shardingsphere</artifactId>
<version>3.9.2</version>
<version>3.9.3</version>
</dependency>-->
</dependencies>
@ -60,6 +60,9 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>org.jeecg.JeecgSystemApplication</mainClass>
</configuration>
</plugin>
</plugins>
</build>

View File

@ -15,8 +15,8 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.MockMvc;
@ -36,43 +36,43 @@ public class SysUserApiTest {
@Autowired
private MockMvc mockMvc;
@MockBean
@MockitoBean
private ISysUserService sysUserService;
@MockBean
@MockitoBean
private ISysDepartService sysDepartService;
@MockBean
@MockitoBean
private ISysUserRoleService sysUserRoleService;
@MockBean
@MockitoBean
private ISysUserDepartService sysUserDepartService;
@MockBean
@MockitoBean
private ISysDepartRoleUserService departRoleUserService;
@MockBean
@MockitoBean
private ISysDepartRoleService departRoleService;
@MockBean
@MockitoBean
private RedisUtil redisUtil;
@Value("${jeecg.path.upload}")
private String upLoadPath;
@MockBean
@MockitoBean
private BaseCommonService baseCommonService;
@MockBean
@MockitoBean
private ISysPositionService sysPositionService;
@MockBean
@MockitoBean
private ISysUserTenantService userTenantService;
@MockBean
@MockitoBean
private JeecgRedisClient jeecgRedisClient;
@MockBean
@MockitoBean
private JeecgBaseConfig jeecgBaseConfig;
/**
* 测试地址实际使用时替换成你自己的地址

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>jeecg-cloud-test</artifactId>
<groupId>org.jeecgframework.boot3</groupId>
<version>3.9.2</version>
<version>3.9.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<description>公共测试模块</description>
@ -34,6 +34,11 @@
<groupId>org.jeecgframework.boot3</groupId>
<artifactId>jeecg-boot-starter-rabbitmq</artifactId>
</dependency>
<!--rabbitmq消息队列-->
<dependency>
<groupId>org.jeecgframework.boot3</groupId>
<artifactId>jeecg-boot-starter-sentinel</artifactId>
</dependency>
<!-- 分布式锁依赖 -->
<dependency>
<groupId>org.jeecgframework.boot3</groupId>