mirror of
https://gitee.com/BDWare/front-base
synced 2025-01-09 17:34:01 +00:00
chore: update build.gradle
upgrade io.netty:netty-tcnative-boringssl-static from 2.0.41.Final to 2.0.46.Final; rename CMDConf.parseConf to CMDConf.parseFile
This commit is contained in:
parent
68062f1498
commit
eb69c62092
@ -23,7 +23,7 @@ sourceSets {
|
||||
}
|
||||
dependencies {
|
||||
api project (":common")
|
||||
api 'io.netty:netty-tcnative-boringssl-static:2.0.41.Final'
|
||||
api 'io.netty:netty-tcnative-boringssl-static:2.0.46.Final'
|
||||
api 'com.google.code.gson:gson:2.8.8'
|
||||
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
|
@ -1,6 +1,5 @@
|
||||
package org.bdware.server;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.bdware.sc.util.JsonUtil;
|
||||
@ -39,7 +38,7 @@ public class CMDConf {
|
||||
public String clientToClusterPlugins = "";
|
||||
public String tcpPlugins = "";
|
||||
|
||||
public static CMDConf parseConf(String confPath) {
|
||||
public static CMDConf parseFile(String confPath) {
|
||||
CMDConf ret = null;
|
||||
File conf = new File(confPath);
|
||||
if (conf.exists()) {
|
||||
@ -49,7 +48,7 @@ public class CMDConf {
|
||||
while (null != (temp = br.readLine())) {
|
||||
sbl.append(temp);
|
||||
}
|
||||
ret = new Gson().fromJson(sbl.toString(), CMDConf.class);
|
||||
ret = JsonUtil.fromJson(sbl.toString(), CMDConf.class);
|
||||
} catch (IOException ignored) {
|
||||
LOGGER.warn("parsing configure from file failed!");
|
||||
}
|
||||
|
@ -15,9 +15,8 @@ import java.io.RandomAccessFile;
|
||||
import static io.netty.handler.codec.http.HttpVersion.HTTP_1_1;
|
||||
|
||||
public class HttpFileHandleAdapter extends SimpleChannelInboundHandler<FullHttpRequest> {
|
||||
|
||||
FileFilter fileFilter;
|
||||
private final String location;
|
||||
FileFilter fileFilter;
|
||||
|
||||
public HttpFileHandleAdapter(String path, FileFilter fileFilter) {
|
||||
location = path;
|
||||
|
Loading…
Reference in New Issue
Block a user