1. 0.2版本更新
This commit is contained in:
parent
b5e4c7ca6e
commit
d039590681
8
pom.xml
8
pom.xml
|
@ -6,7 +6,7 @@
|
|||
|
||||
<groupId>org.aohe</groupId>
|
||||
<artifactId>sane-service</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<version>0.0.2</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
|
@ -57,8 +57,14 @@
|
|||
<optional>true</optional>
|
||||
<version>1.18.30</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.java-websocket</groupId>
|
||||
<artifactId>Java-WebSocket</artifactId>
|
||||
<version>1.5.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<finalName>sane-service-v${project.version}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
|
|
@ -1,29 +1,36 @@
|
|||
package org.aohe;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
import au.com.southsky.jfreesane.SaneDevice;
|
||||
import au.com.southsky.jfreesane.SaneException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aohe.core.sane.utils.SaneSessionUtils;
|
||||
import org.aohe.core.utils.CommandUtils;
|
||||
import org.aohe.core.utils.SystemUtils;
|
||||
import org.aohe.core.web.SocketServer;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
|
||||
@Slf4j
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
public static void main(String[] args) throws IOException, InterruptedException {
|
||||
log.info(" 当前系统类型: {}", SystemUtils.getOsName());
|
||||
List<SaneDevice> deviceList;
|
||||
try {
|
||||
deviceList = SaneSessionUtils.getSaneDrivers();
|
||||
} catch (IOException | SaneException e) {
|
||||
log.info(" 获取驱动报错 {}", e.getMessage());
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
for (SaneDevice sane : deviceList){
|
||||
log.info(sane.getName());
|
||||
}
|
||||
//初始化Sane Socket 守护进程
|
||||
CommandUtils.initSanedSocket();
|
||||
int port = 8997; // 843 flash policy port
|
||||
|
||||
SocketServer s = new SocketServer(port);
|
||||
s.start();
|
||||
System.out.println("scan-service started on port: " + s.getPort());
|
||||
|
||||
BufferedReader sysin = new BufferedReader(new InputStreamReader(System.in));
|
||||
while (true) {
|
||||
String in = sysin.readLine();
|
||||
s.broadcast(in);
|
||||
if (in.equals("exit")) {
|
||||
s.stop(1000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -54,6 +54,8 @@ public class SaneOperational {
|
|||
//r = startScan(param.getString("scannerId"),true);
|
||||
}else if ("001016".equals(function)){
|
||||
//r = startScan(param.getString("scannerId"),true);
|
||||
SaneSessionUtils.printUsedIp();
|
||||
r = R.ok();
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.info("Error , ", e);
|
||||
|
|
|
@ -4,15 +4,25 @@ import au.com.southsky.jfreesane.SaneDevice;
|
|||
import au.com.southsky.jfreesane.SaneException;
|
||||
import au.com.southsky.jfreesane.SaneSession;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.net.Ipv4Util;
|
||||
import cn.hutool.core.net.NetUtil;
|
||||
import cn.hutool.core.util.ByteUtil;
|
||||
import cn.hutool.core.util.RuntimeUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aohe.core.utils.CommandUtils;
|
||||
import org.aohe.core.utils.SystemUtils;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
@Slf4j
|
||||
public class SaneSessionUtils {
|
||||
|
@ -24,7 +34,9 @@ public class SaneSessionUtils {
|
|||
private static volatile SaneDevice saneDevice;
|
||||
|
||||
private static final RemoteConfig remoteConfig = RemoteConfig.getInstance();
|
||||
|
||||
|
||||
private static List<String> beUsedIp = new ArrayList<>(64);
|
||||
|
||||
/**
|
||||
* 获取一个SaneSession实例,用于与SANE设备进行通信
|
||||
* @return SaneSession实例
|
||||
|
@ -168,6 +180,49 @@ public class SaneSessionUtils {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 测试可用ip
|
||||
* @param ips ip
|
||||
*/
|
||||
public static void beUsed(List<String> ips){
|
||||
try (ExecutorService executorService = SystemUtils.newFixedThreadPool(2);){
|
||||
for(String ip : ips){
|
||||
log.info("ip:{} , 开始检测", ip);
|
||||
executorService.submit(() -> SaneSessionUtils.beUsed(ip));
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.info("查找出错 ");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试可用ip
|
||||
* @param ip ip
|
||||
*/
|
||||
public static void beUsed(String ip){
|
||||
log.info("ip:{} , 可用性测试开始", ip);
|
||||
|
||||
if(!NetUtil.ping(ip)){
|
||||
log.info("ip:{} , ping 测试不通过", ip);
|
||||
return;
|
||||
}
|
||||
try (SaneSession session = SaneSession.withRemoteSane(InetAddress.getByName(ip))){
|
||||
if(session == null){
|
||||
|
||||
return;
|
||||
}
|
||||
log.info("ip:{} , session 打开成功", ip);
|
||||
//添加到可用列表
|
||||
beUsedIp.add(ip);
|
||||
} catch (IOException e) {
|
||||
log.info("ip:{} , session 打开失败", ip);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static void printUsedIp(){
|
||||
log.info("可用ip {} ", String.join("|", beUsedIp));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
package org.aohe.core.utils;
|
||||
|
||||
import cn.hutool.core.util.RuntimeUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@Slf4j
|
||||
public class CommandUtils {
|
||||
|
||||
public static void initSanedSocket(){
|
||||
String cmdResult = execForStrUtf8("systemctl status saned.socket");
|
||||
if (StrUtil.isNotEmpty(cmdResult)) {
|
||||
String status = CommandUtils.getSanedSocketStatus(cmdResult);
|
||||
log.info("saned.socket status:{}", status);
|
||||
if (StrUtil.isNotEmpty(status) && "dead".equals(status)) {
|
||||
execForStrUtf8("systemctl start saned.socket");
|
||||
log.info("saned.socket successfully");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static String execForStrUtf8(String command){
|
||||
return RuntimeUtil.execForStr(StandardCharsets.UTF_8,command);
|
||||
}
|
||||
|
||||
public static String getSanedSocketStatus(String commandResult) {
|
||||
String result = "";
|
||||
String[] resultArray = commandResult.split("\n");
|
||||
List<String> list = new ArrayList<>();
|
||||
for (String item : resultArray) {
|
||||
if (item.contains("Active:")) {
|
||||
String serialItem = item.replace("*", "").replace("\t", "").replace(" ", "");
|
||||
list.add(serialItem);
|
||||
}
|
||||
}
|
||||
if (!list.isEmpty()) {
|
||||
Pattern pattern = Pattern.compile("\\((.*?)\\)");
|
||||
Matcher matcher = pattern.matcher(list.getFirst());
|
||||
if (matcher.find()) {
|
||||
result = matcher.group(1);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,7 +1,23 @@
|
|||
package org.aohe.core.utils;
|
||||
|
||||
import cn.hutool.core.net.Ipv4Util;
|
||||
import cn.hutool.core.net.NetUtil;
|
||||
import org.aohe.core.sane.utils.SaneSessionUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.net.*;
|
||||
import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class SystemUtils {
|
||||
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(SystemUtils.class);
|
||||
|
||||
/**
|
||||
* 判断操作系统是否是 Windows
|
||||
*
|
||||
|
@ -45,4 +61,81 @@ public class SystemUtils {
|
|||
public static String getOsName() {
|
||||
return System.getProperty("os.name");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getIP(){
|
||||
try {
|
||||
InetAddress addr = Inet4Address.getLocalHost();
|
||||
NetworkInterface network = NetworkInterface.getByInetAddress(addr);
|
||||
log.info(addr.getHostAddress());
|
||||
short mask = network.getInterfaceAddresses().get(0).getNetworkPrefixLength();
|
||||
//Ipv4Util.list(addr, mask);
|
||||
log.info(mask + "" );
|
||||
} catch (UnknownHostException | SocketException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取第一个内网网卡地址
|
||||
* @return 地址
|
||||
*/
|
||||
public static String getInnerFirstEth(){
|
||||
Enumeration<NetworkInterface> netInterfaces;
|
||||
try {
|
||||
// 拿到所有网卡
|
||||
netInterfaces = NetworkInterface.getNetworkInterfaces();
|
||||
InetAddress ip;
|
||||
// 遍历每个网卡,拿到 ip
|
||||
while (netInterfaces.hasMoreElements()) {
|
||||
NetworkInterface ni = netInterfaces.nextElement();
|
||||
Enumeration<InetAddress> addresses = ni.getInetAddresses();
|
||||
while (addresses.hasMoreElements()) {
|
||||
ip = addresses.nextElement();
|
||||
if (!ip.isLoopbackAddress() && ip.getHostAddress().indexOf(':') == -1) {
|
||||
if(NetUtil.isInnerIP(ip.getHostAddress())){
|
||||
//
|
||||
if(ni.getName().startsWith("eth")){
|
||||
NetworkInterface network = NetworkInterface.getByInetAddress(ip);
|
||||
short mask = 24;
|
||||
for(InterfaceAddress a : network.getInterfaceAddresses()){
|
||||
if(ip.equals(a.getAddress())){
|
||||
//遍历所有 取ip位相同的mask
|
||||
mask = a.getNetworkPrefixLength();
|
||||
}
|
||||
}
|
||||
System.out.println(mask);
|
||||
return ip.getHostAddress()+"/"+mask;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("获取网卡信息失败");
|
||||
}
|
||||
return "127.0.0.1/24";
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
String ip = getInnerFirstEth();
|
||||
List<String> list = Ipv4Util.list(ip, false);
|
||||
SaneSessionUtils.beUsed(list);
|
||||
|
||||
while (true){
|
||||
Thread.sleep(10000);
|
||||
SaneSessionUtils.printUsedIp();
|
||||
}
|
||||
}
|
||||
|
||||
public static ExecutorService newFixedThreadPool(int nThreads) {
|
||||
return new ThreadPoolExecutor(nThreads, nThreads,
|
||||
0L, TimeUnit.MILLISECONDS,
|
||||
new LinkedBlockingQueue<>());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
package org.aohe.core.web;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import org.aohe.core.result.R;
|
||||
import org.aohe.core.sane.SaneOperational;
|
||||
|
||||
import org.aohe.core.sane.utils.SaneSessionUtils;
|
||||
import org.aohe.core.utils.SystemUtils;
|
||||
import org.java_websocket.WebSocket;
|
||||
import org.java_websocket.handshake.ClientHandshake;
|
||||
import org.java_websocket.server.WebSocketServer;
|
||||
|
||||
@Slf4j
|
||||
public class SocketServer extends WebSocketServer {
|
||||
|
||||
|
||||
public SocketServer(int port) throws UnknownHostException {
|
||||
super(new InetSocketAddress(port));
|
||||
}
|
||||
|
||||
public SocketServer(int port, String path) throws UnknownHostException {
|
||||
super(new InetSocketAddress(port));
|
||||
}
|
||||
|
||||
public SocketServer(InetSocketAddress address) {
|
||||
super(address);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOpen(WebSocket conn, ClientHandshake handshake) {
|
||||
conn.send("Welcome to the scan-server!"); // This method sends a message to the new client
|
||||
log.info("client is open ,client system is: {}", SystemUtils.getOsName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClose(WebSocket conn, int code, String reason, boolean remote) {
|
||||
log.info("client is closed , client system is : {}", SystemUtils.getOsName());
|
||||
//这里执行关闭扫描仪连接
|
||||
SaneSessionUtils.resource();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMessage(WebSocket conn, String message) {
|
||||
log.info("User send Data: \n{}", message);
|
||||
String result;
|
||||
if(!JSONUtil.isTypeJSON(message)){
|
||||
result = R.fail("Illegal parameters, not of json type").toJsonStr();
|
||||
}else {
|
||||
result = SaneOperational.selectOperational(message);
|
||||
}
|
||||
log.info("Return data: \n {}", result);
|
||||
conn.send(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(WebSocket conn, Exception ex) {
|
||||
log.error("error :{}", ex.getMessage(), ex);
|
||||
if (conn != null) {
|
||||
//绑定不到就退出
|
||||
//System.exit(0);
|
||||
// some errors like port binding failed may not be assignable to a specific
|
||||
// websocket
|
||||
log.error( "System error ", ex );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
log.info("Server started!");
|
||||
setConnectionLostTimeout(0);
|
||||
setConnectionLostTimeout(100);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
Manifest-Version: 1.0
|
||||
Main-Class: org.aohe.Main
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
[
|
||||
{
|
||||
"name":"java.lang.Boolean",
|
||||
"methods":[{"name":"getBoolean","parameterTypes":["java.lang.String"] }]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.SecurityManager",
|
||||
"fields":[{"name":"initialized"}]
|
||||
},
|
||||
{
|
||||
"name":"org.aohe.Main",
|
||||
"methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }]
|
||||
},
|
||||
{
|
||||
"name":"sun.management.VMManagementImpl",
|
||||
"fields":[{"name":"compTimeMonitoringSupport"}, {"name":"currentThreadCpuTimeSupport"}, {"name":"objectMonitorUsageSupport"}, {"name":"otherThreadCpuTimeSupport"}, {"name":"remoteDiagnosticCommandsSupport"}, {"name":"synchronizerUsageSupport"}, {"name":"threadAllocatedMemorySupport"}, {"name":"threadContentionMonitoringSupport"}]
|
||||
}
|
||||
]
|
|
@ -0,0 +1,8 @@
|
|||
[
|
||||
{
|
||||
"type":"agent-extracted",
|
||||
"classes":[
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
[
|
||||
]
|
|
@ -0,0 +1,227 @@
|
|||
[
|
||||
{
|
||||
"name":"ch.qos.logback.classic.encoder.PatternLayoutEncoder",
|
||||
"queryAllPublicMethods":true,
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.classic.joran.SerializedModelConfigurator",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.classic.pattern.DateConverter",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.classic.pattern.LevelConverter",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.classic.pattern.LineOfCallerConverter",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.classic.pattern.LineSeparatorConverter",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.classic.pattern.LoggerConverter",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.classic.pattern.MessageConverter",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.classic.pattern.MethodOfCallerConverter",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.classic.pattern.ThreadConverter",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.classic.util.DefaultJoranConfigurator",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.core.ConsoleAppender",
|
||||
"queryAllPublicMethods":true,
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.core.FileAppender",
|
||||
"methods":[{"name":"valueOf","parameterTypes":["java.lang.String"] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.core.OutputStreamAppender",
|
||||
"methods":[{"name":"setEncoder","parameterTypes":["ch.qos.logback.core.encoder.Encoder"] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.core.encoder.Encoder",
|
||||
"methods":[{"name":"valueOf","parameterTypes":["java.lang.String"] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.core.encoder.LayoutWrappingEncoder",
|
||||
"methods":[{"name":"setParent","parameterTypes":["ch.qos.logback.core.spi.ContextAware"] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.core.pattern.PatternLayoutEncoderBase",
|
||||
"methods":[{"name":"setPattern","parameterTypes":["java.lang.String"] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.core.rolling.RollingFileAppender",
|
||||
"queryAllPublicMethods":true,
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }, {"name":"setRollingPolicy","parameterTypes":["ch.qos.logback.core.rolling.RollingPolicy"] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.core.rolling.RollingPolicy",
|
||||
"methods":[{"name":"valueOf","parameterTypes":["java.lang.String"] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.core.rolling.RollingPolicyBase",
|
||||
"methods":[{"name":"setFileNamePattern","parameterTypes":["java.lang.String"] }, {"name":"setParent","parameterTypes":["ch.qos.logback.core.FileAppender"] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.core.rolling.TimeBasedRollingPolicy",
|
||||
"queryAllPublicMethods":true,
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }, {"name":"setMaxHistory","parameterTypes":["int"] }, {"name":"setTotalSizeCap","parameterTypes":["ch.qos.logback.core.util.FileSize"] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.core.rolling.helper.DateTokenConverter",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.core.spi.ContextAware",
|
||||
"methods":[{"name":"valueOf","parameterTypes":["java.lang.String"] }]
|
||||
},
|
||||
{
|
||||
"name":"ch.qos.logback.core.util.FileSize",
|
||||
"methods":[{"name":"valueOf","parameterTypes":["java.lang.String"] }]
|
||||
},
|
||||
{
|
||||
"name":"com.alibaba.fastjson.JSONArray"
|
||||
},
|
||||
{
|
||||
"name":"com.alibaba.fastjson.JSONObject"
|
||||
},
|
||||
{
|
||||
"name":"com.alibaba.fastjson2.JSONFactory$CacheItem",
|
||||
"fields":[{"name":"bytes"}, {"name":"chars"}]
|
||||
},
|
||||
{
|
||||
"name":"com.alibaba.fastjson2.JSONObject",
|
||||
"queryAllDeclaredConstructors":true
|
||||
},
|
||||
{
|
||||
"name":"com.alibaba.fastjson2.util.TypeUtils$Cache",
|
||||
"fields":[{"name":"chars"}]
|
||||
},
|
||||
{
|
||||
"name":"com.alibaba.fastjson2.writer.FieldWriter",
|
||||
"fields":[{"name":"initObjectWriter"}]
|
||||
},
|
||||
{
|
||||
"name":"com.alibaba.fastjson2.writer.OWG_1_1_RemoteConfig",
|
||||
"methods":[{"name":"<init>","parameterTypes":["java.lang.Class","java.lang.String","java.lang.String","long","java.util.List"] }]
|
||||
},
|
||||
{
|
||||
"name":"com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl",
|
||||
"methods":[{"name":"<init>","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"java.beans.Transient"
|
||||
},
|
||||
{
|
||||
"name":"java.io.FilePermission"
|
||||
},
|
||||
{
|
||||
"name":"java.lang.RuntimePermission"
|
||||
},
|
||||
{
|
||||
"name":"java.lang.String",
|
||||
"fields":[{"name":"COMPACT_STRINGS"}, {"name":"coder"}, {"name":"value"}],
|
||||
"methods":[{"name":"<init>","parameterTypes":["byte[]","byte"] }, {"name":"coder","parameterTypes":[] }, {"name":"isASCII","parameterTypes":["byte[]"] }, {"name":"value","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.StringCoding",
|
||||
"methods":[{"name":"hasNegatives","parameterTypes":["byte[]","int","int"] }]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.invoke.MethodHandles$Lookup",
|
||||
"fields":[{"name":"IMPL_LOOKUP"}],
|
||||
"methods":[{"name":"<init>","parameterTypes":["java.lang.Class","java.lang.Class","int"] }]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.management.ManagementFactory",
|
||||
"methods":[{"name":"getRuntimeMXBean","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"java.lang.management.RuntimeMXBean",
|
||||
"methods":[{"name":"getInputArguments","parameterTypes":[] }]
|
||||
},
|
||||
{
|
||||
"name":"java.math.BigDecimal",
|
||||
"fields":[{"name":"intCompact"}]
|
||||
},
|
||||
{
|
||||
"name":"java.net.NetPermission"
|
||||
},
|
||||
{
|
||||
"name":"java.net.SocketPermission"
|
||||
},
|
||||
{
|
||||
"name":"java.net.URLPermission",
|
||||
"methods":[{"name":"<init>","parameterTypes":["java.lang.String","java.lang.String"] }]
|
||||
},
|
||||
{
|
||||
"name":"java.security.AllPermission"
|
||||
},
|
||||
{
|
||||
"name":"java.security.SecurityPermission"
|
||||
},
|
||||
{
|
||||
"name":"java.sql.Clob"
|
||||
},
|
||||
{
|
||||
"name":"java.sql.Date"
|
||||
},
|
||||
{
|
||||
"name":"java.sql.Timestamp"
|
||||
},
|
||||
{
|
||||
"name":"java.util.Collections$UnmodifiableCollection"
|
||||
},
|
||||
{
|
||||
"name":"java.util.Collections$UnmodifiableMap"
|
||||
},
|
||||
{
|
||||
"name":"java.util.PropertyPermission"
|
||||
},
|
||||
{
|
||||
"name":"java.util.concurrent.atomic.AtomicBoolean",
|
||||
"fields":[{"name":"value"}]
|
||||
},
|
||||
{
|
||||
"name":"java.util.concurrent.atomic.AtomicReference",
|
||||
"fields":[{"name":"value"}]
|
||||
},
|
||||
{
|
||||
"name":"javax.smartcardio.CardPermission"
|
||||
},
|
||||
{
|
||||
"name":"javax.sql.DataSource"
|
||||
},
|
||||
{
|
||||
"name":"javax.sql.RowSet"
|
||||
},
|
||||
{
|
||||
"name":"org.aohe.core.sane.utils.RemoteConfig",
|
||||
"allDeclaredFields":true,
|
||||
"queryAllPublicMethods":true
|
||||
},
|
||||
{
|
||||
"name":"sun.misc.Unsafe",
|
||||
"fields":[{"name":"theUnsafe"}]
|
||||
}
|
||||
]
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"resources":{
|
||||
"includes":[{
|
||||
"pattern":"\\QMETA-INF/services/ch.qos.logback.classic.spi.Configurator\\E"
|
||||
}, {
|
||||
"pattern":"\\QMETA-INF/services/cn.hutool.core.convert.Converter\\E"
|
||||
}, {
|
||||
"pattern":"\\QMETA-INF/services/cn.hutool.log.LogFactory\\E"
|
||||
}, {
|
||||
"pattern":"\\QMETA-INF/services/java.lang.System$LoggerFinder\\E"
|
||||
}, {
|
||||
"pattern":"\\QMETA-INF/services/java.time.zone.ZoneRulesProvider\\E"
|
||||
}, {
|
||||
"pattern":"\\QMETA-INF/services/javax.xml.parsers.SAXParserFactory\\E"
|
||||
}, {
|
||||
"pattern":"\\QMETA-INF/services/org.slf4j.spi.SLF4JServiceProvider\\E"
|
||||
}, {
|
||||
"pattern":"\\Qconfig.setting\\E"
|
||||
}, {
|
||||
"pattern":"\\Qfastjson2.properties\\E"
|
||||
}, {
|
||||
"pattern":"\\Qlogback-test.scmo\\E"
|
||||
}, {
|
||||
"pattern":"\\Qlogback-test.xml\\E"
|
||||
}, {
|
||||
"pattern":"\\Qlogback.scmo\\E"
|
||||
}, {
|
||||
"pattern":"\\Qlogback.xml\\E"
|
||||
}]},
|
||||
"bundles":[]
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"types":[
|
||||
],
|
||||
"lambdaCapturingTypes":[
|
||||
],
|
||||
"proxies":[
|
||||
]
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="~/Logs/ScanService"/>
|
||||
<property name="log.path" value="${HOME}/Logs/ScanService"/>
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||
|
||||
|
|
Loading…
Reference in New Issue