提交 88ec0c77 编写于 作者: 秦英杰

fix:环境

上级 1d52164e
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
<version>2.5.6</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/com.alibaba/druid --> <!-- https://mvnrepository.com/artifact/com.alibaba/druid -->
<dependency> <dependency>
...@@ -122,7 +123,7 @@ ...@@ -122,7 +123,7 @@
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-extension</artifactId> <artifactId>mybatis-plus-extension</artifactId>
<version>3.5.1</version> <version>3.5.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>
...@@ -142,7 +143,7 @@ ...@@ -142,7 +143,7 @@
<dependency> <dependency>
<groupId>cn.hutool</groupId> <groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId> <artifactId>hutool-all</artifactId>
<version>5.8.12</version> <version>5.8.25</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.alibaba.fastjson2</groupId> <groupId>com.alibaba.fastjson2</groupId>
...@@ -159,7 +160,7 @@ ...@@ -159,7 +160,7 @@
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.12</version> <version>4.13.1</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
...@@ -249,14 +250,6 @@ ...@@ -249,14 +250,6 @@
<artifactId>poi</artifactId> <artifactId>poi</artifactId>
<version>4.1.2</version> <version>4.1.2</version>
</dependency> </dependency>
<!--引入redis依赖-->
<!-- Redisson Core 包 -->
<!-- <dependency>-->
<!-- <groupId>org.redisson</groupId>-->
<!-- <artifactId>redisson-core</artifactId>-->
<!-- <version>3.17.2</version> &lt;!&ndash; 请替换为最新版本 &ndash;&gt;-->
<!-- </dependency>-->
<!-- Redisson 客户端包 --> <!-- Redisson 客户端包 -->
<dependency> <dependency>
<groupId>org.redisson</groupId> <groupId>org.redisson</groupId>
......
...@@ -56,9 +56,9 @@ public class FileContainsUtil { ...@@ -56,9 +56,9 @@ public class FileContainsUtil {
StopWatch stopWatch = new StopWatch(); StopWatch stopWatch = new StopWatch();
currentTime("开始时间"); currentTime("开始时间");
stopWatch.start("删除未用到的图片"); stopWatch.start("删除未用到的图片");
//不存在的图片集合 // 不存在的图片集合
final List<String> isNotExist = new ArrayList<>(); final List<String> isNotExist = new ArrayList<>();
//获取所有图片名称 // 获取所有图片名称
final List<String> picNames = getPicName(PIC_PATH); final List<String> picNames = getPicName(PIC_PATH);
final int size = picNames.size(); final int size = picNames.size();
log.info("图片总数为{}", size); log.info("图片总数为{}", size);
...@@ -66,7 +66,7 @@ public class FileContainsUtil { ...@@ -66,7 +66,7 @@ public class FileContainsUtil {
moreThread(groupedPicNames, isNotExist); moreThread(groupedPicNames, isNotExist);
log.info("不存在图片总数为{}", isNotExist.size()); log.info("不存在图片总数为{}", isNotExist.size());
stopWatch.stop(); stopWatch.stop();
//毫秒输出 // 毫秒输出
log.info("耗时统计信息:{}", JSON.toJSONString(stopWatch.getTaskInfo())); log.info("耗时统计信息:{}", JSON.toJSONString(stopWatch.getTaskInfo()));
log.info("耗时秒数:{}", JSON.toJSONString(stopWatch.getTotalTimeSeconds())); log.info("耗时秒数:{}", JSON.toJSONString(stopWatch.getTotalTimeSeconds()));
log.info("耗时分钟数:{}", JSON.toJSONString(stopWatch.getTotalTimeSeconds() / 60)); log.info("耗时分钟数:{}", JSON.toJSONString(stopWatch.getTotalTimeSeconds() / 60));
...@@ -88,11 +88,11 @@ public class FileContainsUtil { ...@@ -88,11 +88,11 @@ public class FileContainsUtil {
// 在这里执行处理图片组的任务 // 在这里执行处理图片组的任务
if (CollectionUtil.isNotEmpty(group)) { if (CollectionUtil.isNotEmpty(group)) {
for (String picName : group) { for (String picName : group) {
//是白名单里面的图片,直接忽略 // 是白名单里面的图片,直接忽略
if (!PIC_PATH_WHITELISTS.contains(picName)) { if (!PIC_PATH_WHITELISTS.contains(picName)) {
//默认不存在 // 默认不存在
IS_EXIST.set(false); IS_EXIST.set(false);
//包含某个字符串 // 包含某个字符串
try { try {
traverseFolder(BLOG_FOLDER1, picName); traverseFolder(BLOG_FOLDER1, picName);
traverseFolder(BLOG_FOLDER2, picName); traverseFolder(BLOG_FOLDER2, picName);
...@@ -100,7 +100,7 @@ public class FileContainsUtil { ...@@ -100,7 +100,7 @@ public class FileContainsUtil {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
//文件不存在 // 文件不存在
if (!IS_EXIST.get()) { if (!IS_EXIST.get()) {
isNotExist.add(picName); isNotExist.add(picName);
deletePic(PIC_PATH + picName); deletePic(PIC_PATH + picName);
...@@ -150,15 +150,15 @@ public class FileContainsUtil { ...@@ -150,15 +150,15 @@ public class FileContainsUtil {
public static void traverseFolder(String path, String word) throws Exception { public static void traverseFolder(String path, String word) throws Exception {
File file = new File(path); File file = new File(path);
if (file.exists()) { if (file.exists()) {
//获取文件夹下的文件 // 获取文件夹下的文件
File[] files = file.listFiles(); File[] files = file.listFiles();
if (null != files && files.length != 0) { if (null != files && files.length != 0) {
for (File file2 : files) { for (File file2 : files) {
//是否是文件夹 // 是否是文件夹
if (file2.isDirectory()) { if (file2.isDirectory()) {
traverseFolder(file2.getAbsolutePath(), word); traverseFolder(file2.getAbsolutePath(), word);
} else { } else {
//包含md结尾的文件 // 包含md结尾的文件
if (file2.getAbsolutePath().contains(".md")) { if (file2.getAbsolutePath().contains(".md")) {
getParams(file2.getAbsolutePath(), word); getParams(file2.getAbsolutePath(), word);
} }
...@@ -177,12 +177,12 @@ public class FileContainsUtil { ...@@ -177,12 +177,12 @@ public class FileContainsUtil {
*/ */
public static void getParams(String classPath, String word) throws IOException { public static void getParams(String classPath, String word) throws IOException {
File file = new File(classPath); File file = new File(classPath);
//每行作为一个字符串,存为列表元素 // 每行作为一个字符串,存为列表元素
List<String> strings = Files.readLines(file, Charsets.UTF_8); List<String> strings = Files.readLines(file, Charsets.UTF_8);
for (String string : strings) { for (String string : strings) {
//判断是否包含方法名称,即指定字符串 // 判断是否包含方法名称,即指定字符串
if (string.contains(word)) { if (string.contains(word)) {
//文件存在 // 文件存在
IS_EXIST.set(true); IS_EXIST.set(true);
} }
} }
...@@ -198,13 +198,13 @@ public class FileContainsUtil { ...@@ -198,13 +198,13 @@ public class FileContainsUtil {
List<String> picNames = new ArrayList<>(); List<String> picNames = new ArrayList<>();
File file = new File(path); File file = new File(path);
if (file.exists()) { if (file.exists()) {
//获取文件夹下的文件 // 获取文件夹下的文件
File[] files = file.listFiles(); File[] files = file.listFiles();
if (null != files && files.length != 0) { if (null != files && files.length != 0) {
for (File file2 : files) { for (File file2 : files) {
//是否是文件夹 // 是否是文件夹
if (!file2.isDirectory()) { if (!file2.isDirectory()) {
//包含md结尾的文件 // 包含md结尾的文件
final String name = file2.getName(); final String name = file2.getName();
picNames.add(name); picNames.add(name);
} }
......
...@@ -5,7 +5,7 @@ spring: ...@@ -5,7 +5,7 @@ spring:
# 发送者的邮箱账号 # 发送者的邮箱账号
username: 327782001@qq.com username: 327782001@qq.com
# 邮箱密码授权码 # 邮箱密码授权码
password: kypxnmwfniqrcbeh password: xxx
properties: properties:
mail: mail:
smtp: smtp:
...@@ -32,10 +32,8 @@ spring: ...@@ -32,10 +32,8 @@ spring:
datasource: datasource:
kwan-ds: kwan-ds:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
# url: jdbc:mysql://localhost:3306/kwan?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai url: jdbc:mysql://localhost:3306/kwan?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
url: jdbc:mysql://43.139.90.182:3306/kwan?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
username: root username: root
# password: 716288qwe
password: 123456 password: 123456
ali-ds: ali-ds:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
...@@ -57,7 +55,7 @@ csdn: ...@@ -57,7 +55,7 @@ csdn:
#自动评论 #自动评论
self_reply: 感谢你的支持,大佬!;你的支持真的太棒了,大佬!;无法不感谢你的支持,大佬!;你的帮助对我来说意义重大,大佬!;大佬的支持让我感到非常荣幸。;我深深感激你的支持,大佬!;有你这样的大佬支持真是太好了。;大佬的支持是我前进的动力。;感激不尽,因为有了大佬的支持。;有你的支持,我感到非常幸运。;大佬的支持让一切都变得更加容易。;你的支持让我感到无比感激,大佬!;有你在我身边真的太棒了,大佬。;感谢你一直支持着我,大佬!;大佬的支持是我最大的动力之一。;你的鼓励和支持对我来说非常重要。;大佬的支持让我感到无比荣幸。;感谢你的不离不弃,大佬!;你的支持一直如同明灯照亮我的前路。;有你的支持,我觉得自己非常幸运。 self_reply: 感谢你的支持,大佬!;你的支持真的太棒了,大佬!;无法不感谢你的支持,大佬!;你的帮助对我来说意义重大,大佬!;大佬的支持让我感到非常荣幸。;我深深感激你的支持,大佬!;有你这样的大佬支持真是太好了。;大佬的支持是我前进的动力。;感激不尽,因为有了大佬的支持。;有你的支持,我感到非常幸运。;大佬的支持让一切都变得更加容易。;你的支持让我感到无比感激,大佬!;有你在我身边真的太棒了,大佬。;感谢你一直支持着我,大佬!;大佬的支持是我最大的动力之一。;你的鼓励和支持对我来说非常重要。;大佬的支持让我感到无比荣幸。;感谢你的不离不弃,大佬!;你的支持一直如同明灯照亮我的前路。;有你的支持,我觉得自己非常幸运。
#cookie,身份验证 #cookie,身份验证
cookie: "uuid_tt_dd=10_20285116700-1697522872601-604163; c_adb=1; loginbox_strategy=%7B%22taskId%22%3A308%2C%22abCheckTime%22%3A1697522874474%2C%22version%22%3A%22control%22%7D; UserName=qyj19920704; UserInfo=a7d3b88c53a841ebb5792202cb43c84f; UserToken=a7d3b88c53a841ebb5792202cb43c84f; UserNick=%E6%AA%80%E8%B6%8A%E5%89%91%E6%8C%87%E5%A4%A7%E5%8E%82; AU=769; UN=qyj19920704; BT=1697522886100; p_uid=U010000; Hm_up_6bcd52f51e9b3dce32bec4a3997715ac=%7B%22islogin%22%3A%7B%22value%22%3A%221%22%2C%22scope%22%3A1%7D%2C%22isonline%22%3A%7B%22value%22%3A%221%22%2C%22scope%22%3A1%7D%2C%22isvip%22%3A%7B%22value%22%3A%220%22%2C%22scope%22%3A1%7D%2C%22uid_%22%3A%7B%22value%22%3A%22qyj19920704%22%2C%22scope%22%3A1%7D%7D; management_ques=1697592152734; blog_details_recommend_nps=1697616147423; c_segment=3; Hm_lvt_6bcd52f51e9b3dce32bec4a3997715ac=1697522874,1697551027,1697636661,1697683407; csrfToken=jTRD3_1IBVA703lu2FkVkazx; dc_sid=9f7a02ed8375e91d86271ddaf1cf2ce4; c_first_ref=default; c_first_page=https%3A//liucy.blog.csdn.net/article/details/133852303%3Fspm%3D1001.2014.3001.5502; c_segment=3; Hm_lvt_e5ef47b9f471504959267fd614d579cd=1697764951; Hm_lpvt_e5ef47b9f471504959267fd614d579cd=1697764951; 404_page_nps=1697764955523; ssxmod_itna=YqUxBD97kOGHD8D2BmYite44zxcYo1=WOiox0vmvqGzDAxn40iDtgeqODDwu0/DNMQiDpiDuWOntaV73S5fd3iPeaN3D84i7DKqibDCqD1D3qDktzDYA8Dt4DTD34DYDiO=DBRsUQDFATN/3wUjmGtDG4DgDB=DxBEl3djBAq4DCr4DbxPy7mrDtLNSeLLdXT0/nn5Yf445SOG5lipwm0GdG7vwBA4PlDxNt8v1wADoGGGQYf+IE75ep753zpDxD; ssxmod_itna2=YqUxBD97kOGHD8D2BmYite44zxcYo1=WOYxn9EenDDsYebDLGQCoqQuGvHdDQRKYubdD6QqomsRD3xyRI/W9Q5nhe8oeYUvimaWYrNsqwcDgL6mDjYUhZK09LYcY/t5hSuP2va/kclf6hRkNh+LPyDwic73=9i4d94Lvw/R=oQ7E+jT4jjjA2Y+=QplLm8nbePRb+7=Re1CpjmZ4wIrnNPSKofWnIj=WOtkFtphylt+GhUxr0KkGtTzDXKDEEkbn3qhIn3Sj/ezt1u2MO3M9h7zEL6RunrXaKE+YdkRnIKiTG93cqpGFq8Fwr7ehksk1ZSWhoN2hQydddqQ1bTOSW8ddX+7g24v4TZ0+52=Y8PsOwfhavW4ECY8+GZOK=ro97bK0=Yi3YD5ZGsq25FhPodIRGCD2O8xidfo8+NR88v+rq4+b=fUOEK2frPEPdLFuYkao9uCfM1+cFZQ7q6HEMfRLjf6bhof0=1YhEYO1U=NZCPvDDw2Psluciq4De13mDNBODwqLwwg44qwOiDf=j1fKK5q+8gd7DDjKDeMv/04YDmLGvrwqOz4cov79500D4D==; c_first_ref=default; c_first_page=https%3A//mp.csdn.net/; creative_btn_mp=3; c_hasSub=true; write_guide_show=3; log_Id_click=177; dc_session_id=11_1698022100317.787671; c_dsid=11_1698022100317.794351; log_Id_pv=149; log_Id_view=1105; c_pref=https%3A//i.csdn.net/; c_ref=https%3A//blog.csdn.net/imwucx; c_page_id=default; dc_session_id=11_1698022100317.787671; c_dsid=11_1698022100317.794351; log_Id_view=1106; dc_tos=s2yi9b; log_Id_click=178; c_pref=https%3A//blog.csdn.net/imwucx; log_Id_pv=150; c_ref=https%3A//blog.csdn.net/imwucx/article/details/133915120%3Fspm%3D1001.2014.3001.5501; creativeSetApiNew=%7B%22toolbarImg%22%3Anull%2C%22publishSuccessImg%22%3Anull%2C%22articleNum%22%3A895%2C%22type%22%3A0%2C%22oldUser%22%3Afalse%2C%22useSeven%22%3Afalse%2C%22userName%22%3A%22qyj19920704%22%7D; c_page_id=default; Hm_lpvt_6bcd52f51e9b3dce32bec4a3997715ac=1698023119; dc_tos=s2yj16" cookie: "uuid_tt_dd=10_2028%22abCheckTime%22%3A1697522874474%2C%22version%22%3A%22control%22%7D; UserName=qyj19920704; UserInfo=a7d3b88c53a841ebb5792202cb43c84f; UserToken=a7d3b88c53a841ebb5792202cb43c84f; UserNick=%E6%AA%80%E8%B6%8A%E5%89%91%E6%8C%87%E5%A4%A7%E5%8E%82; AU=769; UN=qyj19920704; BT=1697522886100; p_uid=U010000; Hm_up_6bcd52f51e9b3dce32bec4a3997715ac=%7B%22islogin%22%3A%7B%22value%22%3A%221%22%2C%22scope%22%3A1%7D%2C%22isonline%22%3A%7B%22value%22%3A%221%22%2C%22scope%22%3A1%7D%2C%22isvip%22%3A%7B%22value%22%3A%220%22%2C%22scope%22%3A1%7D%2C%22uid_%22%3A%7B%22value%22%3A%22qyj19920704%22%2C%22scope%22%3A1%7D%7D; management_ques=1697592152734; blog_details_recommend_nps=1697616147423; c_segment=3; Hm_lvt_6bcd52f51e9b3dce32bec4a3997715ac=1697522874,1697551027,1697636661,1697683407; csrfToken=jTRD3_1IBVA703lu2FkVkazx; dc_sid=9f7a02ed8375e91d86271ddaf1cf2ce4; c_first_ref=default; c_first_page=https%3A//liucy.blog.csdn.net/article/details/133852303%3Fspm%3D1001.2014.3001.5502; c_segment=3; Hm_lvt_e5ef47b9f471504959267fd614d579cd=1697764951; Hm_lpvt_e5ef47b9f471504959267fd614d579cd=1697764951; 404_page_nps=1697764955523; ssxmod_itna=YqUxBD97kOGHD8D2BmYite44zxcYo1=WOiox0vmvqGzDAxn40iDtgeqODDwu0/DNMQiDpiDuWOntaV73S5fd3iPeaN3D84i7DKqibDCqD1D3qDktzDYA8Dt4DTD34DYDiO=DBRsUQDFATN/3wUjmGtDG4DgDB=DxBEl3djBAq4DCr4DbxPy7mrDtLNSeLLdXT0/nn5Yf445SOG5lipwm0GdG7vwBA4PlDxNt8v1wADoGGGQYf+IE75ep753zpDxD; ssxmod_itna2=YqUxBD97kOGHD8D2BmYite44zxcYo1=WOYxn9EenDDsYebDLGQCoqQuGvHdDQRKYubdD6QqomsRD3xyRI/W9Q5nhe8oeYUvimaWYrNsqwcDgL6mDjYUhZK09LYcY/t5hSuP2va/kclf6hRkNh+LPyDwic73=9i4d94Lvw/R=oQ7E+jT4jjjA2Y+=QplLm8nbePRb+7=Re1CpjmZ4wIrnNPSKofWnIj=WOtkFtphylt+GhUxr0KkGtTzDXKDEEkbn3qhIn3Sj/ezt1u2MO3M9h7zEL6RunrXaKE+YdkRnIKiTG93cqpGFq8Fwr7ehksk1ZSWhoN2hQydddqQ1bTOSW8ddX+7g24v4TZ0+52=Y8PsOwfhavW4ECY8+GZOK=ro97bK0=Yi3YD5ZGsq25FhPodIRGCD2O8xidfo8+NR88v+rq4+b=fUOEK2frPEPdLFuYkao9uCfM1+cFZQ7q6HEMfRLjf6bhof0=1YhEYO1U=NZCPvDDw2Psluciq4De13mDNBODwqLwwg44qwOiDf=j1fKK5q+8gd7DDjKDeMv/04YDmLGvrwqOz4cov79500D4D==; c_first_ref=default; c_first_page=https%3A//mp.csdn.net/; creative_btn_mp=3; c_hasSub=true; write_guide_show=3; log_Id_click=177; dc_session_id=11_1698022100317.787671; c_dsid=11_1698022100317.794351; log_Id_pv=149; log_Id_view=1105; c_pref=https%3A//i.csdn.net/; c_ref=https%3A//blog.csdn.net/imwucx; c_page_id=default; dc_session_id=11_1698022100317.787671; c_dsid=11_1698022100317.794351; log_Id_view=1106; dc_tos=s2yi9b; log_Id_click=178; c_pref=https%3A//blog.csdn.net/imwucx; log_Id_pv=150; c_ref=https%3A//blog.csdn.net/imwucx/article/details/133915120%3Fspm%3D1001.2014.3001.5501; creativeSetApiNew=%7B%22toolbarImg%22%3Anull%2C%22publishSuccessImg%22%3Anull%2C%22articleNum%22%3A895%2C%22type%22%3A0%2C%22oldUser%22%3Afalse%2C%22useSeven%22%3Afalse%2C%22userName%22%3A%22qyj19920704%22%7D; c_page_id=default; Hm_lpvt_6bcd52f51e9b3dce32bec4a3997715ac=1698023119; dc_tos=s2yj16"
url: url:
user_article_url: "https://blog.csdn.net/community/home-api/v1/get-business-list" #获取用户文章接口 user_article_url: "https://blog.csdn.net/community/home-api/v1/get-business-list" #获取用户文章接口
is_collect_url: "https://blog.csdn.net/phoenix/web/v1/isCollect" #是否收藏接口 is_collect_url: "https://blog.csdn.net/phoenix/web/v1/isCollect" #是否收藏接口
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册