StringUtils.isEmpty 改为自定义类,Spring不符合需求
This commit is contained in:
parent
4045102e16
commit
a1070c03ab
@ -10,7 +10,7 @@ import org.springframework.core.io.FileSystemResource;
|
|||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
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.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
@ -5,7 +5,7 @@ import com.yutou.nas.interfaces.DownloadInterface;
|
|||||||
import com.yutou.nas.utils.QQBotManager;
|
import com.yutou.nas.utils.QQBotManager;
|
||||||
import com.yutou.nas.utils.Tools;
|
import com.yutou.nas.utils.Tools;
|
||||||
import org.springframework.stereotype.Controller;
|
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.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
@ -1,17 +1,14 @@
|
|||||||
package com.yutou.nas.Controllers;
|
package com.yutou.nas.Controllers;
|
||||||
|
|
||||||
import com.aliyun.oss.OSS;
|
|
||||||
import com.yutou.nas.utils.HttpTools;
|
import com.yutou.nas.utils.HttpTools;
|
||||||
import com.yutou.nas.utils.OSSManager;
|
|
||||||
import com.yutou.nas.utils.RedisTools;
|
import com.yutou.nas.utils.RedisTools;
|
||||||
|
import com.yutou.nas.utils.StringUtils;
|
||||||
import com.yutou.nas.utils.Tools;
|
import com.yutou.nas.utils.Tools;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.util.StringUtils;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
|
@ -12,7 +12,7 @@ import org.springframework.context.annotation.Import;
|
|||||||
@Import(BTDownloadManager.class)
|
@Import(BTDownloadManager.class)
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class NasApplication {
|
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) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(NasApplication.class, args);
|
SpringApplication.run(NasApplication.class, args);
|
||||||
AppData.defaultMusicPath = (String) ConfigTools.load(ConfigTools.CONFIG, "musicDir");
|
AppData.defaultMusicPath = (String) ConfigTools.load(ConfigTools.CONFIG, "musicDir");
|
||||||
|
@ -22,7 +22,7 @@ import net.bramp.ffmpeg.probe.FFmpegFormat;
|
|||||||
import net.bramp.ffmpeg.probe.FFmpegProbeResult;
|
import net.bramp.ffmpeg.probe.FFmpegProbeResult;
|
||||||
import net.bramp.ffmpeg.probe.FFmpegStream;
|
import net.bramp.ffmpeg.probe.FFmpegStream;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.StringUtils;
|
import com.yutou.nas.utils.StringUtils;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -9,7 +9,7 @@ import com.yutou.nas.mybatis.model.BangumiItemExample;
|
|||||||
import com.yutou.nas.mybatis.model.BangumiList;
|
import com.yutou.nas.mybatis.model.BangumiList;
|
||||||
import com.yutou.nas.mybatis.model.BangumiListExample;
|
import com.yutou.nas.mybatis.model.BangumiListExample;
|
||||||
import org.springframework.stereotype.Controller;
|
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.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
@ -5,7 +5,7 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.yutou.nas.utils.HttpTools;
|
import com.yutou.nas.utils.HttpTools;
|
||||||
import com.yutou.nas.utils.RedisTools;
|
import com.yutou.nas.utils.RedisTools;
|
||||||
import com.yutou.nas.utils.Tools;
|
import com.yutou.nas.utils.Tools;
|
||||||
import org.springframework.util.StringUtils;
|
import com.yutou.nas.utils.StringUtils;
|
||||||
|
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
@ -4,13 +4,11 @@ import com.alibaba.fastjson.JSONArray;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.yutou.nas.Services.IBangumiService;
|
import com.yutou.nas.Services.IBangumiService;
|
||||||
import com.yutou.nas.bangumi.AnimationData;
|
import com.yutou.nas.bangumi.AnimationData;
|
||||||
import com.yutou.nas.interfaces.DownloadInterface;
|
|
||||||
import com.yutou.nas.mybatis.model.BangumiItem;
|
import com.yutou.nas.mybatis.model.BangumiItem;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.springframework.beans.BeansException;
|
import org.springframework.beans.BeansException;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.context.ApplicationContextAware;
|
import org.springframework.context.ApplicationContextAware;
|
||||||
import org.springframework.util.StringUtils;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -3,7 +3,7 @@ package com.yutou.nas.utils;
|
|||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.yutou.nas.interfaces.DownloadInterface;
|
import com.yutou.nas.interfaces.DownloadInterface;
|
||||||
import org.springframework.util.StringUtils;
|
import com.yutou.nas.utils.StringUtils;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
|
@ -3,7 +3,7 @@ package com.yutou.nas.utils;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.yutou.nas.interfaces.DownloadInterface;
|
import com.yutou.nas.interfaces.DownloadInterface;
|
||||||
import com.yutou.nas.utils.Interfaces.NetworkInterface;
|
import com.yutou.nas.utils.Interfaces.NetworkInterface;
|
||||||
import org.springframework.util.StringUtils;
|
import com.yutou.nas.utils.StringUtils;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.yutou.nas.utils;
|
package com.yutou.nas.utils;
|
||||||
|
|
||||||
import org.springframework.util.StringUtils;
|
import com.yutou.nas.utils.StringUtils;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -13,7 +13,7 @@ import net.mamoe.mirai.message.data.Image;
|
|||||||
import net.mamoe.mirai.message.data.MessageChainBuilder;
|
import net.mamoe.mirai.message.data.MessageChainBuilder;
|
||||||
import net.mamoe.mirai.utils.BotConfiguration;
|
import net.mamoe.mirai.utils.BotConfiguration;
|
||||||
import net.mamoe.mirai.utils.ExternalResource;
|
import net.mamoe.mirai.utils.ExternalResource;
|
||||||
import org.springframework.util.StringUtils;
|
import com.yutou.nas.utils.StringUtils;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
7
src/main/java/com/yutou/nas/utils/StringUtils.java
Normal file
7
src/main/java/com/yutou/nas/utils/StringUtils.java
Normal file
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -7,7 +7,7 @@ import org.springframework.core.io.FileSystemResource;
|
|||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.util.StringUtils;
|
import com.yutou.nas.utils.StringUtils;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.servlet.http.Cookie;
|
import javax.servlet.http.Cookie;
|
||||||
|
Loading…
Reference in New Issue
Block a user