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

View File

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

View File

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