Merge remote-tracking branch 'origin/master'

# Conflicts:
#	jeecg-boot/pom.xml
dev
JEECG 3 months ago
commit 2ec13165d3

@ -463,7 +463,7 @@ public class oConvertUtils {
return false; return false;
} }
List<String> childs = childArray.toJavaList(String.class); String[] childs = childArray.toArray(new String[]{});
for (String v : childs) { for (String v : childs) {
if (!isIn(v, all)) { if (!isIn(v, all)) {
return false; return false;

@ -3,10 +3,10 @@ package org.jeecg.test.sqlinjection;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.sf.jsqlparser.JSQLParserException; import net.sf.jsqlparser.JSQLParserException;
import org.jeecg.common.util.SqlInjectionUtil; import org.jeecg.common.util.SqlInjectionUtil;
import org.junit.Test; import org.junit.jupiter.api.Test;
import static org.junit.Assert.assertFalse; import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.jupiter.api.Assertions.assertTrue;
/** /**

@ -3,10 +3,10 @@ package org.jeecg.test.sqlinjection;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.sf.jsqlparser.JSQLParserException; import net.sf.jsqlparser.JSQLParserException;
import org.jeecg.common.util.SqlInjectionUtil; import org.jeecg.common.util.SqlInjectionUtil;
import org.junit.Test; import org.junit.jupiter.api.Test;
import static org.junit.Assert.assertFalse; import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.jupiter.api.Assertions.assertTrue;
/** /**

@ -3,10 +3,10 @@ package org.jeecg.test.sqlinjection;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.sf.jsqlparser.JSQLParserException; import net.sf.jsqlparser.JSQLParserException;
import org.jeecg.common.util.SqlInjectionUtil; import org.jeecg.common.util.SqlInjectionUtil;
import org.junit.Test; import org.junit.jupiter.api.Test;
import static org.junit.Assert.assertFalse; import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.Assert.assertTrue; import static org.junit.jupiter.api.Assertions.assertTrue;
/** /**

@ -2,7 +2,7 @@ package org.jeecg.test.sqlinjection;
import com.baomidou.mybatisplus.core.toolkit.sql.SqlInjectionUtils; import com.baomidou.mybatisplus.core.toolkit.sql.SqlInjectionUtils;
import org.jeecg.common.util.SqlInjectionUtil; import org.jeecg.common.util.SqlInjectionUtil;
import org.junit.Test; import org.junit.jupiter.api.Test;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

@ -4,7 +4,7 @@ import net.sf.jsqlparser.JSQLParserException;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.common.util.sqlparse.JSqlParserUtils; import org.jeecg.common.util.sqlparse.JSqlParserUtils;
import org.jeecg.common.util.sqlparse.vo.SelectSqlInfo; import org.jeecg.common.util.sqlparse.vo.SelectSqlInfo;
import org.junit.Test; import org.junit.jupiter.api.Test;
import java.util.Map; import java.util.Map;

@ -1,17 +1,12 @@
package org.jeecg.test.sqlparse; package org.jeecg.test.sqlparse;
import net.sf.jsqlparser.JSQLParserException;
import org.jeecg.common.util.IpUtils; import org.jeecg.common.util.IpUtils;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.junit.Test; import org.junit.jupiter.api.Test;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/** /**
* @author: scott * @author: scott
* @date: 20240429 16:48 * @date: 20240429 16:48

@ -14,11 +14,9 @@ import org.jeecg.common.constant.enums.MessageTypeEnum;
import org.jeecg.common.constant.enums.SysAnnmentTypeEnum; import org.jeecg.common.constant.enums.SysAnnmentTypeEnum;
import org.jeecg.common.system.api.ISysBaseAPI; import org.jeecg.common.system.api.ISysBaseAPI;
import org.jeecg.common.util.DySmsHelper; import org.jeecg.common.util.DySmsHelper;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -27,7 +25,6 @@ import java.util.Map;
* @Description: * @Description:
* @Author: lsq * @Author: lsq
*/ */
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = JeecgSystemApplication.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = JeecgSystemApplication.class)
public class SendMessageTest { public class SendMessageTest {

@ -6,20 +6,17 @@ import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.util.JwtUtil; import org.jeecg.common.system.util.JwtUtil;
import org.jeecg.common.util.RedisUtil; import org.jeecg.common.util.RedisUtil;
import org.jeecg.common.util.RestUtil; import org.jeecg.common.util.RestUtil;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.test.context.junit4.SpringRunner;
/** /**
* *
*/ */
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,classes = JeecgSystemApplication.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,classes = JeecgSystemApplication.class)
public class InsertDemoTest { public class InsertDemoTest {
/** /**

@ -6,16 +6,13 @@ import org.jeecg.modules.demo.test.entity.JeecgDemo;
import org.jeecg.modules.demo.test.mapper.JeecgDemoMapper; import org.jeecg.modules.demo.test.mapper.JeecgDemoMapper;
import org.jeecg.modules.demo.test.service.IJeecgDemoService; import org.jeecg.modules.demo.test.service.IJeecgDemoService;
import org.jeecg.modules.system.service.ISysDataLogService; import org.jeecg.modules.system.service.ISysDataLogService;
import org.junit.Assert; import org.junit.jupiter.api.Assertions;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,classes = JeecgSystemApplication.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,classes = JeecgSystemApplication.class)
public class SampleTest { public class SampleTest {
@ -32,7 +29,7 @@ public class SampleTest {
public void testSelect() { public void testSelect() {
System.out.println(("----- selectAll method test ------")); System.out.println(("----- selectAll method test ------"));
List<JeecgDemo> userList = jeecgDemoMapper.selectList(null); List<JeecgDemo> userList = jeecgDemoMapper.selectList(null);
Assert.assertEquals(5, userList.size()); Assertions.assertEquals(5, userList.size());
userList.forEach(System.out::println); userList.forEach(System.out::println);
} }

@ -4,9 +4,8 @@ import org.jeecg.JeecgSystemApplication;
import org.jeecg.common.system.api.ISysBaseAPI; import org.jeecg.common.system.api.ISysBaseAPI;
import org.jeecg.config.JeecgBaseConfig; import org.jeecg.config.JeecgBaseConfig;
import org.jeecg.config.firewall.SqlInjection.IDictTableWhiteListHandler; import org.jeecg.config.firewall.SqlInjection.IDictTableWhiteListHandler;
import org.junit.Before; import org.junit.jupiter.api.BeforeEach;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
@ -15,7 +14,6 @@ import org.springframework.test.context.junit4.SpringRunner;
* @Description: * @Description:
* @Author: sunjianlei * @Author: sunjianlei
*/ */
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = JeecgSystemApplication.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = JeecgSystemApplication.class)
public class SysTableWhiteCheckTest { public class SysTableWhiteCheckTest {
@ -27,7 +25,7 @@ public class SysTableWhiteCheckTest {
@Autowired @Autowired
JeecgBaseConfig jeecgBaseConfig; JeecgBaseConfig jeecgBaseConfig;
@Before @BeforeEach
public void before() { public void before() {
String lowCodeMode = this.jeecgBaseConfig.getFirewall().getLowCodeMode(); String lowCodeMode = this.jeecgBaseConfig.getFirewall().getLowCodeMode();
System.out.println("当前 LowCode 模式为: " + lowCodeMode); System.out.println("当前 LowCode 模式为: " + lowCodeMode);

@ -6,8 +6,7 @@ import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.util.JwtUtil; import org.jeecg.common.system.util.JwtUtil;
import org.jeecg.common.util.RedisUtil; import org.jeecg.common.util.RedisUtil;
import org.jeecg.common.util.RestUtil; import org.jeecg.common.util.RestUtil;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
@ -19,7 +18,6 @@ import org.springframework.test.context.junit4.SpringRunner;
/** /**
* *
*/ */
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,classes = JeecgSystemApplication.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,classes = JeecgSystemApplication.class)
public class SysUserTest { public class SysUserTest {
/** /**

@ -1,6 +1,6 @@
package org.jeecg.smallTools; package org.jeecg.smallTools;
import org.junit.Test; import org.junit.jupiter.api.Test;
/** /**
* sql * sql

@ -2,7 +2,7 @@ package org.jeecg.smallTools;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.junit.Test; import org.junit.jupiter.api.Test;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.util.Arrays; import java.util.Arrays;

@ -1,5 +1,5 @@
import org.jeecg.loader.vo.PredicatesVo; import org.jeecg.loader.vo.PredicatesVo;
import org.junit.Test; import org.junit.jupiter.api.Test;
import java.util.*; import java.util.*;

@ -124,11 +124,6 @@
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<!-- Lombok --> <!-- Lombok -->
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>

Loading…
Cancel
Save