diff --git a/src/main/java/com/yutou/nas/Controllers/MusicController.java b/src/main/java/com/yutou/nas/Controllers/MusicController.java index 5bc9e1c..e15d3f5 100644 --- a/src/main/java/com/yutou/nas/Controllers/MusicController.java +++ b/src/main/java/com/yutou/nas/Controllers/MusicController.java @@ -10,7 +10,7 @@ import org.springframework.core.io.FileSystemResource; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; -import org.springframework.util.StringUtils; +import com.yutou.nas.utils.StringUtils; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; diff --git a/src/main/java/com/yutou/nas/Controllers/QQBot.java b/src/main/java/com/yutou/nas/Controllers/QQBot.java index 4a951ab..be1682f 100644 --- a/src/main/java/com/yutou/nas/Controllers/QQBot.java +++ b/src/main/java/com/yutou/nas/Controllers/QQBot.java @@ -5,7 +5,7 @@ import com.yutou.nas.interfaces.DownloadInterface; import com.yutou.nas.utils.QQBotManager; import com.yutou.nas.utils.Tools; import org.springframework.stereotype.Controller; -import org.springframework.util.StringUtils; +import com.yutou.nas.utils.StringUtils; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; diff --git a/src/main/java/com/yutou/nas/Controllers/ToolsController.java b/src/main/java/com/yutou/nas/Controllers/ToolsController.java index 3c98ea1..98fb85a 100644 --- a/src/main/java/com/yutou/nas/Controllers/ToolsController.java +++ b/src/main/java/com/yutou/nas/Controllers/ToolsController.java @@ -1,17 +1,14 @@ package com.yutou.nas.Controllers; -import com.aliyun.oss.OSS; import com.yutou.nas.utils.HttpTools; -import com.yutou.nas.utils.OSSManager; import com.yutou.nas.utils.RedisTools; +import com.yutou.nas.utils.StringUtils; import com.yutou.nas.utils.Tools; import org.springframework.stereotype.Controller; -import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; -import java.io.File; import java.io.IOException; @Controller diff --git a/src/main/java/com/yutou/nas/NasApplication.java b/src/main/java/com/yutou/nas/NasApplication.java index 072da37..b73ffcd 100644 --- a/src/main/java/com/yutou/nas/NasApplication.java +++ b/src/main/java/com/yutou/nas/NasApplication.java @@ -12,7 +12,7 @@ import org.springframework.context.annotation.Import; @Import(BTDownloadManager.class) @SpringBootApplication public class NasApplication { - public static final String version="1.1.5"; + public static final String version="1.1.5.1"; public static void main(String[] args) { SpringApplication.run(NasApplication.class, args); AppData.defaultMusicPath = (String) ConfigTools.load(ConfigTools.CONFIG, "musicDir"); diff --git a/src/main/java/com/yutou/nas/Services/impl/MusicToolsServiceImpl.java b/src/main/java/com/yutou/nas/Services/impl/MusicToolsServiceImpl.java index a6f5b69..40767c0 100644 --- a/src/main/java/com/yutou/nas/Services/impl/MusicToolsServiceImpl.java +++ b/src/main/java/com/yutou/nas/Services/impl/MusicToolsServiceImpl.java @@ -22,7 +22,7 @@ import net.bramp.ffmpeg.probe.FFmpegFormat; import net.bramp.ffmpeg.probe.FFmpegProbeResult; import net.bramp.ffmpeg.probe.FFmpegStream; import org.springframework.stereotype.Service; -import org.springframework.util.StringUtils; +import com.yutou.nas.utils.StringUtils; import javax.annotation.Resource; import java.io.File; diff --git a/src/main/java/com/yutou/nas/bangumi/AnimationController.java b/src/main/java/com/yutou/nas/bangumi/AnimationController.java index 5894cfc..ecfa2b3 100644 --- a/src/main/java/com/yutou/nas/bangumi/AnimationController.java +++ b/src/main/java/com/yutou/nas/bangumi/AnimationController.java @@ -9,7 +9,7 @@ import com.yutou.nas.mybatis.model.BangumiItemExample; import com.yutou.nas.mybatis.model.BangumiList; import com.yutou.nas.mybatis.model.BangumiListExample; import org.springframework.stereotype.Controller; -import org.springframework.util.StringUtils; +import com.yutou.nas.utils.StringUtils; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; diff --git a/src/main/java/com/yutou/nas/bangumi/BangumiTools.java b/src/main/java/com/yutou/nas/bangumi/BangumiTools.java index ad0971d..364551b 100644 --- a/src/main/java/com/yutou/nas/bangumi/BangumiTools.java +++ b/src/main/java/com/yutou/nas/bangumi/BangumiTools.java @@ -5,7 +5,7 @@ import com.alibaba.fastjson.JSONObject; import com.yutou.nas.utils.HttpTools; import com.yutou.nas.utils.RedisTools; import com.yutou.nas.utils.Tools; -import org.springframework.util.StringUtils; +import com.yutou.nas.utils.StringUtils; import java.text.ParseException; import java.text.SimpleDateFormat; diff --git a/src/main/java/com/yutou/nas/utils/BTDownloadManager.java b/src/main/java/com/yutou/nas/utils/BTDownloadManager.java index b1b2c95..574426c 100644 --- a/src/main/java/com/yutou/nas/utils/BTDownloadManager.java +++ b/src/main/java/com/yutou/nas/utils/BTDownloadManager.java @@ -4,13 +4,11 @@ import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.yutou.nas.Services.IBangumiService; import com.yutou.nas.bangumi.AnimationData; -import com.yutou.nas.interfaces.DownloadInterface; import com.yutou.nas.mybatis.model.BangumiItem; import org.jetbrains.annotations.NotNull; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; -import org.springframework.util.StringUtils; import javax.annotation.Resource; import java.io.File; diff --git a/src/main/java/com/yutou/nas/utils/DepotManager.java b/src/main/java/com/yutou/nas/utils/DepotManager.java index 4e91ee2..7b004fd 100644 --- a/src/main/java/com/yutou/nas/utils/DepotManager.java +++ b/src/main/java/com/yutou/nas/utils/DepotManager.java @@ -3,7 +3,7 @@ package com.yutou.nas.utils; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.yutou.nas.interfaces.DownloadInterface; -import org.springframework.util.StringUtils; +import com.yutou.nas.utils.StringUtils; import java.io.File; import java.io.FileNotFoundException; diff --git a/src/main/java/com/yutou/nas/utils/HttpTools.java b/src/main/java/com/yutou/nas/utils/HttpTools.java index 456acb6..4af0d06 100644 --- a/src/main/java/com/yutou/nas/utils/HttpTools.java +++ b/src/main/java/com/yutou/nas/utils/HttpTools.java @@ -3,7 +3,7 @@ package com.yutou.nas.utils; import com.alibaba.fastjson.JSONObject; import com.yutou.nas.interfaces.DownloadInterface; import com.yutou.nas.utils.Interfaces.NetworkInterface; -import org.springframework.util.StringUtils; +import com.yutou.nas.utils.StringUtils; import java.io.*; import java.net.HttpURLConnection; diff --git a/src/main/java/com/yutou/nas/utils/IdeaTools.java b/src/main/java/com/yutou/nas/utils/IdeaTools.java index 07aac77..c3d2394 100644 --- a/src/main/java/com/yutou/nas/utils/IdeaTools.java +++ b/src/main/java/com/yutou/nas/utils/IdeaTools.java @@ -1,6 +1,6 @@ package com.yutou.nas.utils; -import org.springframework.util.StringUtils; +import com.yutou.nas.utils.StringUtils; import java.io.File; import java.io.IOException; diff --git a/src/main/java/com/yutou/nas/utils/QQBotManager.java b/src/main/java/com/yutou/nas/utils/QQBotManager.java index aa2ec31..87ab4e0 100644 --- a/src/main/java/com/yutou/nas/utils/QQBotManager.java +++ b/src/main/java/com/yutou/nas/utils/QQBotManager.java @@ -13,7 +13,7 @@ import net.mamoe.mirai.message.data.Image; import net.mamoe.mirai.message.data.MessageChainBuilder; import net.mamoe.mirai.utils.BotConfiguration; import net.mamoe.mirai.utils.ExternalResource; -import org.springframework.util.StringUtils; +import com.yutou.nas.utils.StringUtils; import java.io.File; import java.lang.reflect.Field; diff --git a/src/main/java/com/yutou/nas/utils/StringUtils.java b/src/main/java/com/yutou/nas/utils/StringUtils.java new file mode 100644 index 0000000..e54ca3c --- /dev/null +++ b/src/main/java/com/yutou/nas/utils/StringUtils.java @@ -0,0 +1,7 @@ +package com.yutou.nas.utils; + +public class StringUtils { + public static boolean isEmpty(String str){ + return str == null || str.trim().length() == 0; + } +} diff --git a/src/main/java/com/yutou/nas/utils/Tools.java b/src/main/java/com/yutou/nas/utils/Tools.java index 0066bb1..ac54a5a 100644 --- a/src/main/java/com/yutou/nas/utils/Tools.java +++ b/src/main/java/com/yutou/nas/utils/Tools.java @@ -7,7 +7,7 @@ import org.springframework.core.io.FileSystemResource; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; -import org.springframework.util.StringUtils; +import com.yutou.nas.utils.StringUtils; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.Cookie;