This commit is contained in:
hongqiaowei
2022-03-04 11:18:44 +08:00
committed by GitHub
parent 5ca63817a1
commit 5df2cf3834
41 changed files with 1886 additions and 51 deletions

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>fizz-gateway-community</artifactId>
<groupId>com.fizzgate</groupId>
<version>2.5.2</version>
<version>2.6</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -17,6 +17,15 @@
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons</artifactId>
</dependency>
<dependency>
<groupId>com.networknt</groupId>
<artifactId>json-schema-validator-i18n-support</artifactId>

View File

@@ -25,6 +25,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.Trigger;
import org.springframework.scheduling.TriggerContext;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.SchedulingConfigurer;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
@@ -33,9 +34,10 @@ import org.springframework.scheduling.config.ScheduledTaskRegistrar;
*/
@ConfigurationProperties(prefix = "sched")
@EnableScheduling
public abstract class SchedConfig implements SchedulingConfigurer {
private int executors = 1;
private int executors = 2;
public void setExecutors(int es) {
executors = es;

View File

@@ -0,0 +1,34 @@
/*
* Copyright (C) 2021 the original author or authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package we.util;
import java.util.Objects;
/**
* @author hongqiaowei
*/
public abstract class StringUtils extends org.apache.commons.lang3.StringUtils {
private StringUtils() {
}
public static boolean notEquals(String s1, String s2) {
return !Objects.equals(s1, s2);
}
}