update
This commit is contained in:
parent
fc91057f5b
commit
6cc210a25e
@ -28,8 +28,9 @@ public class GoogleAccount {
|
|||||||
* @param s window size - must be >=1 and <=17. Other values are ignored
|
* @param s window size - must be >=1 and <=17. Other values are ignored
|
||||||
*/
|
*/
|
||||||
public void setWindowSize(int s) {
|
public void setWindowSize(int s) {
|
||||||
if (s >= 1 && s <= 17)
|
if (s >= 1 && s <= 17) {
|
||||||
window_size = s;
|
window_size = s;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5,10 +5,10 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class ToolsApplication {
|
public class ToolsApplication {
|
||||||
public static final String version="1.1.0";
|
public static final String version="1.1.1";
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
System.out.println("当前版本号:" + version);
|
System.out.println("当前版本号:" + version);
|
||||||
SpringApplication.run(ToolsApplication.class, args);
|
SpringApplication.run(ToolsApplication.class, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -29,14 +29,17 @@ public class AnimationController {
|
|||||||
@RequestMapping(value = "rss/data.do", method = RequestMethod.GET)
|
@RequestMapping(value = "rss/data.do", method = RequestMethod.GET)
|
||||||
public String getAnimList(String key,String type,String team, int page) {
|
public String getAnimList(String key,String type,String team, int page) {
|
||||||
boolean isNull = key.length() == 0;
|
boolean isNull = key.length() == 0;
|
||||||
if(!StringUtils.isEmpty(type)&&type.length()>2)
|
if(!StringUtils.isEmpty(type)&&type.length()>2) {
|
||||||
type=type.substring(2);
|
type=type.substring(2);
|
||||||
if(!StringUtils.isEmpty(team)&&team.length()>2)
|
}
|
||||||
|
if(!StringUtils.isEmpty(team)&&team.length()>2) {
|
||||||
team=team.substring(2);
|
team=team.substring(2);
|
||||||
|
}
|
||||||
String[] keys = key.split(" ");
|
String[] keys = key.split(" ");
|
||||||
JSONArray items = null;
|
JSONArray items = null;
|
||||||
if (!isNull)
|
if (!isNull) {
|
||||||
items = new AnimationData().bangumiList(page,type,team, keys);
|
items = new AnimationData().bangumiList(page,type,team, keys);
|
||||||
|
}
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
if (items != null) {
|
if (items != null) {
|
||||||
json.put("data", items);
|
json.put("data", items);
|
||||||
|
@ -188,16 +188,18 @@ public class RedisTools {
|
|||||||
private static boolean init = false;
|
private static boolean init = false;
|
||||||
|
|
||||||
public static void initRedisPoolSub() {
|
public static void initRedisPoolSub() {
|
||||||
if (init)
|
if (init) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
init = true;
|
init = true;
|
||||||
System.out.println("初始化订阅");
|
System.out.println("初始化订阅");
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Jedis jedis = getPoolRedis();
|
Jedis jedis = getPoolRedis();
|
||||||
if (jedis != null)
|
if (jedis != null) {
|
||||||
jedis.psubscribe(new Consumer(), "*");
|
jedis.psubscribe(new Consumer(), "*");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user