mirror of
https://github.com/LamGC/ContentGrabbingJi.git
synced 2025-07-02 21:37:26 +00:00
[Add] ApplicationMain 程序主入口, 负责初始化项目运行环境和启动项目; [Add] log4j2.xml 使用上一版日志配置, 后续会有调整; [Add] cgj_setting.json 初始配置文件, 需等 Core 模块完成后才会具体编写;
50 lines
1.5 KiB
Java
50 lines
1.5 KiB
Java
/*
|
|
* 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 <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
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() {}
|
|
|
|
}
|