diff --git a/ContentGrabbingJi-exec/src/main/java/net/lamgc/cgj/ApplicationMain.java b/ContentGrabbingJi-exec/src/main/java/net/lamgc/cgj/ApplicationMain.java new file mode 100644 index 0000000..d4e1add --- /dev/null +++ b/ContentGrabbingJi-exec/src/main/java/net/lamgc/cgj/ApplicationMain.java @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2020 LamGC + * + * ContentGrabbingJi is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * ContentGrabbingJi 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 Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package net.lamgc.cgj; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * ContentGrabbingJi 启动主类. + * + * 请不要在该类,甚至是该模块(指 exec 模块)开发任何与启动项目无关的功能! + * @author LamGC + */ +public class ApplicationMain { + + private final static Logger log = LoggerFactory.getLogger(ApplicationMain.class); + + public static void main(String[] args) { + log.info("ContentGrabbingJi 正在启动中..."); + beforeRun(); + log.info("初始化完成, 正在启动Core..."); + run(); + log.info("正在清理运行时内容..."); + afterRun(); + log.info("ContentGrabbingJi 退出."); + } + + private static void beforeRun() {} + + private static void run() {} + + private static void afterRun() {} + +} diff --git a/ContentGrabbingJi-exec/src/main/resources/default_config/cgj_setting.json b/ContentGrabbingJi-exec/src/main/resources/default_config/cgj_setting.json new file mode 100644 index 0000000..0e0dcd2 --- /dev/null +++ b/ContentGrabbingJi-exec/src/main/resources/default_config/cgj_setting.json @@ -0,0 +1,3 @@ +{ + +} \ No newline at end of file diff --git a/ContentGrabbingJi-exec/src/main/resources/log4j2.xml b/ContentGrabbingJi-exec/src/main/resources/log4j2.xml new file mode 100644 index 0000000..757aec8 --- /dev/null +++ b/ContentGrabbingJi-exec/src/main/resources/log4j2.xml @@ -0,0 +1,59 @@ + + + + + ./logs + UTF-8 + [%-d{HH:mm:ss.SSS} %5level][%logger.%method():%-3L][%thread]: %msg%n + [%-d{HH:mm:ss.SSS} %5level][%logger]: %msg%n + ${sys:cgj.logsPath:-logs} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file