更新依赖
This commit is contained in:
parent
f59069399f
commit
9d391ea369
20
pom.xml
20
pom.xml
@ -47,19 +47,19 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<version>RELEASE</version>
|
||||
<version>2.7.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>redis.clients</groupId>
|
||||
<artifactId>jedis</artifactId>
|
||||
<version>3.6.3</version>
|
||||
<version>4.2.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-redis</artifactId>
|
||||
<version>2.2.5.RELEASE</version>
|
||||
<version>2.7.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
@ -69,20 +69,20 @@
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>2.2.0</version>
|
||||
<version>2.2.2</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.22</version>
|
||||
<version>1.18.24</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.79</version>
|
||||
<groupId>com.alibaba.fastjson2</groupId>
|
||||
<artifactId>fastjson2</artifactId>
|
||||
<version>2.0.8</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/com.jcraft/jsch -->
|
||||
<dependency>
|
||||
@ -93,13 +93,13 @@
|
||||
<dependency>
|
||||
<groupId>com.aliyun.oss</groupId>
|
||||
<artifactId>aliyun-sdk-oss</artifactId>
|
||||
<version>3.13.2</version>
|
||||
<version>3.15.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.xerial</groupId>
|
||||
<artifactId>sqlite-jdbc</artifactId>
|
||||
<version>3.36.0.2</version>
|
||||
<version>3.36.0.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.yutou.tools.AuthConfig;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.tools.mybatis.dao.PermissionDao;
|
||||
import com.yutou.tools.mybatis.dao.UKeyDao;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.yutou.tools.AuthConfig;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.yutou.tools.mybatis.dao.PermissionDao;
|
||||
import com.yutou.tools.mybatis.dao.UKeyDao;
|
||||
import com.yutou.tools.mybatis.model.Permission;
|
||||
@ -79,14 +79,14 @@ public class RoleAccessDecisionManager implements AccessDecisionManager {
|
||||
}
|
||||
UKey key = list.get(0);
|
||||
JSONArray powers = JSONArray.parseArray(key.getPower());
|
||||
if(powers.toJavaList(String.class).contains("-1")){
|
||||
if(powers.toList(String.class).contains("-1")){
|
||||
return;
|
||||
}
|
||||
PermissionExample pExample = new PermissionExample();
|
||||
pExample.createCriteria().andUrlEqualTo(url);
|
||||
List<Permission> permissions = permissionDao.selectByExample(pExample);
|
||||
if (!permissions.isEmpty()) {
|
||||
if (!powers.toJavaList(String.class).contains(permissions.get(0).getId()+"")) {
|
||||
if (!powers.toList(String.class).contains(permissions.get(0).getId()+"")) {
|
||||
System.out.println("111111");
|
||||
error();
|
||||
}else{
|
||||
|
@ -1,7 +1,8 @@
|
||||
package com.yutou.tools.BiliBili;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.tools.mybatis.dao.BilibiliLiveDao;
|
||||
import com.yutou.tools.mybatis.model.BilibiliLive;
|
||||
import com.yutou.tools.mybatis.model.BilibiliLiveExample;
|
||||
@ -54,7 +55,7 @@ public class Live {
|
||||
JSONObject json=new JSONObject();
|
||||
json.put("code",0);
|
||||
json.put("msg","ok");
|
||||
json.put("data",JSONArray.toJSON(list));
|
||||
json.put("data", JSON.toJSON(list));
|
||||
return json.toJSONString();
|
||||
}
|
||||
@ResponseBody
|
||||
|
@ -1,8 +1,8 @@
|
||||
package com.yutou.tools.Tools;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.tools.mybatis.dao.PermissionDao;
|
||||
import com.yutou.tools.mybatis.dao.UKeyDao;
|
||||
import com.yutou.tools.mybatis.model.Permission;
|
||||
@ -66,7 +66,7 @@ public class AuthManagerController {
|
||||
admin.put("disabled", "");
|
||||
admin.put("checked", "");
|
||||
allPermission.add(admin);
|
||||
List<String> list = powers.toJavaList(String.class);
|
||||
List<String> list = powers.toList(String.class);
|
||||
if (list.contains("-1")) {
|
||||
userPermission.add("-1");
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
package com.yutou.tools.Tools;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.tools.mybatis.dao.ToolsPasswordDao;
|
||||
import com.yutou.tools.mybatis.dao.ToolsPasswordTypeDao;
|
||||
import com.yutou.tools.mybatis.model.ToolsPassword;
|
||||
@ -45,7 +46,7 @@ public class PasswordManager {
|
||||
}
|
||||
json.put("code",0);
|
||||
json.put("msg","ok");
|
||||
json.put("data", JSONArray.toJSON(passwords));
|
||||
json.put("data", JSON.toJSON(passwords));
|
||||
return json.toJSONString();
|
||||
}
|
||||
@ResponseBody
|
||||
@ -100,7 +101,7 @@ public class PasswordManager {
|
||||
List<ToolsPasswordType> toolsPasswordTypes=passwordTypeDao.selectByExample(example);
|
||||
json.put("code",0);
|
||||
json.put("msg","ok");
|
||||
json.put("data", JSONArray.toJSON(toolsPasswordTypes));
|
||||
json.put("data", JSON.toJSON(toolsPasswordTypes));
|
||||
return json.toJSONString();
|
||||
}
|
||||
@ResponseBody
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.yutou.tools.bangumi;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.tools.nas.UpdateIp;
|
||||
import com.yutou.tools.utils.HttpTools;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
@ -1,7 +1,8 @@
|
||||
package com.yutou.tools.bangumi;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.tools.mybatis.dao.BangumiItemDao;
|
||||
import com.yutou.tools.mybatis.dao.BangumiListDao;
|
||||
import com.yutou.tools.mybatis.model.BangumiItem;
|
||||
@ -70,7 +71,7 @@ public class AnimationController {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("code", 0);
|
||||
json.put("msg", "ok");
|
||||
json.put("data", JSONArray.toJSON(listDao.selectByExample(new BangumiListExample())));
|
||||
json.put("data", JSON.toJSON(listDao.selectByExample(new BangumiListExample())));
|
||||
return json.toJSONString();
|
||||
}
|
||||
@ResponseBody
|
||||
@ -111,7 +112,7 @@ public class AnimationController {
|
||||
example.createCriteria().andBidEqualTo(type);
|
||||
json.put("code", 0);
|
||||
json.put("msg", "ok");
|
||||
json.put("data", JSONArray.toJSON(itemDao.selectByExample(example)));
|
||||
json.put("data", JSON.toJSON(itemDao.selectByExample(example)));
|
||||
return json.toJSONString();
|
||||
}
|
||||
@ResponseBody
|
||||
@ -161,7 +162,7 @@ public class AnimationController {
|
||||
item.setCategories(animationData.nameToValue(item.getCategories(),false)+"");
|
||||
item.setAuthor(animationData.nameToValue(item.getAuthor(),true)+"");
|
||||
}
|
||||
JSONArray array= (JSONArray) JSONArray.toJSON(list);
|
||||
JSONArray array= (JSONArray) JSON.toJSON(list);
|
||||
return array.toJSONString();
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.yutou.tools.bangumi;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.tools.utils.HttpTools;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
|
@ -1,7 +1,8 @@
|
||||
package com.yutou.tools.nas;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.tools.mybatis.dao.NasAdminAddressDao;
|
||||
import com.yutou.tools.mybatis.model.NasAdminAddress;
|
||||
import com.yutou.tools.mybatis.model.NasAdminAddressExample;
|
||||
@ -66,7 +67,7 @@ public class NasManager {
|
||||
if (list.size() == 0) {
|
||||
json.put("data", new JSONArray());
|
||||
} else {
|
||||
json.put("data", JSONArray.toJSON(list));
|
||||
json.put("data", JSON.toJSON(list));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.yutou.tools.nas;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.tools.utils.ConfigTools;
|
||||
import com.yutou.tools.utils.RedisTools;
|
||||
import com.yutou.tools.utils.Tools;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.yutou.tools.other;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.tools.ToolsApplication;
|
||||
import com.yutou.tools.mybatis.dao.UKeyDao;
|
||||
import com.yutou.tools.mybatis.model.UKey;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.yutou.tools.sqlite;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.yutou.tools.sqlite;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.tools.utils.ConfigTools;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.yutou.tools.utils;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.yutou.tools.mybatis.dao.PermissionDao;
|
||||
import com.yutou.tools.mybatis.dao.UKeyDao;
|
||||
import com.yutou.tools.mybatis.model.Permission;
|
||||
@ -62,14 +62,14 @@ public class APIFilter implements Filter {
|
||||
|
||||
UKey key = list.get(0);
|
||||
JSONArray powers = JSONArray.parseArray(key.getPower());
|
||||
if(powers.toJavaList(String.class).contains("-1")){
|
||||
if(powers.toList(String.class).contains("-1")){
|
||||
isToken=true;
|
||||
}else {
|
||||
PermissionExample pExample = new PermissionExample();
|
||||
pExample.createCriteria().andUrlEqualTo(url);
|
||||
List<Permission> permissions = permissionDao.selectByExample(pExample);
|
||||
if (permissions != null && permissions.size() > 0) {
|
||||
if (powers.toJavaList(String.class).contains(permissions.get(0).getId()+"")) {
|
||||
if (powers.toList(String.class).contains(permissions.get(0).getId()+"")) {
|
||||
isToken = true;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.yutou.tools.utils;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
|
||||
import javax.net.ssl.HttpsURLConnection;
|
||||
import java.io.BufferedReader;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.yutou.tools.utils;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.yutou.tools.utils;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.tools.interfaces.DownloadInterface;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
package com.yutou.tools.utils;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
@ -26,7 +27,7 @@ public class NasDepotManager {
|
||||
json.put("code",1);
|
||||
json.put("msg","添加成功");
|
||||
}
|
||||
json.put("data", JSONArray.toJSON(RedisTools.list_get(DEPOT_NAME)));
|
||||
json.put("data", JSON.toJSON(RedisTools.list_get(DEPOT_NAME)));
|
||||
return json;
|
||||
|
||||
}
|
||||
@ -36,7 +37,7 @@ public class NasDepotManager {
|
||||
JSONObject json=new JSONObject();
|
||||
json.put("code",1);
|
||||
json.put("msg","ok");
|
||||
json.put("data", JSONArray.toJSON(RedisTools.list_get(DEPOT_NAME)));
|
||||
json.put("data", JSON.toJSON(RedisTools.list_get(DEPOT_NAME)));
|
||||
return json;
|
||||
}
|
||||
@ResponseBody
|
||||
|
@ -8,7 +8,7 @@ import java.util.HashSet;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import redis.clients.jedis.Jedis;
|
||||
import redis.clients.jedis.JedisPool;
|
||||
import redis.clients.jedis.JedisPoolConfig;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.yutou.tools.utils;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.tools.interfaces.DownloadInterface;
|
||||
import com.yutou.tools.nas.UpdateIp;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.yutou.tools.web;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.tools.Tools.GoogleAccount;
|
||||
import com.yutou.tools.utils.ConfigTools;
|
||||
import com.yutou.tools.utils.RedisTools;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.yutou.tools;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yutou.tools.Tools.AuthManagerController;
|
||||
import com.yutou.tools.utils.Tools;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
Loading…
Reference in New Issue
Block a user