From dff27dc659f22d06b193083306bdff071fe9ad56 Mon Sep 17 00:00:00 2001 From: thinkgem Date: Thu, 21 Sep 2023 15:30:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=80=E4=B8=AA=E6=9E=81?= =?UTF-8?q?=E5=B0=8F=E7=9A=84=E5=86=85=E6=A0=B8web=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C1=E7=A7=92=E5=90=AF=E5=8A=A8=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web-mini/README.md | 15 ++ web-mini/bin/docker-build.bat | 19 ++ web-mini/bin/docker-build.sh | 16 ++ web-mini/bin/docker/Dockerfile | 21 +++ web-mini/bin/init-data.bat | 34 ++++ web-mini/bin/init-data.sh | 35 ++++ web-mini/bin/package.bat | 22 +++ web-mini/bin/package.sh | 18 ++ web-mini/bin/run-tomcat.bat | 20 ++ web-mini/bin/run-tomcat.sh | 15 ++ web-mini/bin/run-web.bat | 31 ++++ web-mini/bin/run-web.sh | 27 +++ web-mini/pom.xml | 132 +++++++++++++ .../com/jeesite/modules/MiniApplication.java | 42 +++++ .../resources/config/application-prod.yml | 45 +++++ .../src/main/resources/config/application.yml | 174 ++++++++++++++++++ .../resources/config/beetl-core.properties | 158 ++++++++++++++++ .../resources/config/logback-spring-prod.xml | 70 +++++++ .../main/resources/config/logback-spring.xml | 61 ++++++ .../src/main/resources/config/logger-core.xml | 59 ++++++ .../main/resources/mybatis/mybatis-config.xml | 59 ++++++ .../main/resources/static/common/common.css | 5 + .../main/resources/static/common/common.js | 5 + .../src/main/resources/static/favicon.png | Bin 0 -> 4794 bytes .../main/resources/views/include/csslibs.html | 23 +++ .../main/resources/views/include/head.html | 11 ++ .../main/resources/views/include/jslibs.html | 48 +++++ .../main/resources/views/layouts/default.html | 12 ++ web-mini/src/main/webapp/WEB-INF/startup.bat | 51 +++++ web-mini/src/main/webapp/WEB-INF/startup.sh | 33 ++++ 30 files changed, 1261 insertions(+) create mode 100644 web-mini/README.md create mode 100644 web-mini/bin/docker-build.bat create mode 100644 web-mini/bin/docker-build.sh create mode 100644 web-mini/bin/docker/Dockerfile create mode 100644 web-mini/bin/init-data.bat create mode 100644 web-mini/bin/init-data.sh create mode 100644 web-mini/bin/package.bat create mode 100644 web-mini/bin/package.sh create mode 100644 web-mini/bin/run-tomcat.bat create mode 100644 web-mini/bin/run-tomcat.sh create mode 100644 web-mini/bin/run-web.bat create mode 100644 web-mini/bin/run-web.sh create mode 100644 web-mini/pom.xml create mode 100644 web-mini/src/main/java/com/jeesite/modules/MiniApplication.java create mode 100644 web-mini/src/main/resources/config/application-prod.yml create mode 100644 web-mini/src/main/resources/config/application.yml create mode 100644 web-mini/src/main/resources/config/beetl-core.properties create mode 100644 web-mini/src/main/resources/config/logback-spring-prod.xml create mode 100644 web-mini/src/main/resources/config/logback-spring.xml create mode 100644 web-mini/src/main/resources/config/logger-core.xml create mode 100644 web-mini/src/main/resources/mybatis/mybatis-config.xml create mode 100644 web-mini/src/main/resources/static/common/common.css create mode 100644 web-mini/src/main/resources/static/common/common.js create mode 100644 web-mini/src/main/resources/static/favicon.png create mode 100644 web-mini/src/main/resources/views/include/csslibs.html create mode 100644 web-mini/src/main/resources/views/include/head.html create mode 100644 web-mini/src/main/resources/views/include/jslibs.html create mode 100644 web-mini/src/main/resources/views/layouts/default.html create mode 100644 web-mini/src/main/webapp/WEB-INF/startup.bat create mode 100644 web-mini/src/main/webapp/WEB-INF/startup.sh diff --git a/web-mini/README.md b/web-mini/README.md new file mode 100644 index 00000000..4f638034 --- /dev/null +++ b/web-mini/README.md @@ -0,0 +1,15 @@ +## 介绍 + +jeesite-web-mini 是一个 JeeSite 极小的内核服务,1秒启动项目。 + +一般可用于后台内部数据处理服务,该项目不会初始化界面和权限。 + +甚至可以不初始化数据源,是一个非常快的小微服务。 + +## 文档 + +部署文档:http://jeesite.com/docs/install-deploy/ + +常见问题:http://jeesite.com/docs/faq/ + +更多文档:http://jeesite.com/docs diff --git a/web-mini/bin/docker-build.bat b/web-mini/bin/docker-build.bat new file mode 100644 index 00000000..a70a6f87 --- /dev/null +++ b/web-mini/bin/docker-build.bat @@ -0,0 +1,19 @@ +@echo off +rem /** +rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved. +rem * No deletion without permission, or be held responsible to law. +rem * +rem * Author: ThinkGem@163.com +rem */ +echo. +echo [Ϣ] WeḅDocker +echo. + +%~d0 +cd %~dp0 + +cd .. +call mvn clean package docker:remove docker:build -Dmaven.test.skip=true -U + +cd bin +pause \ No newline at end of file diff --git a/web-mini/bin/docker-build.sh b/web-mini/bin/docker-build.sh new file mode 100644 index 00000000..ab475930 --- /dev/null +++ b/web-mini/bin/docker-build.sh @@ -0,0 +1,16 @@ +#!/bin/sh +# /** +# * Copyright (c) 2013-Now http://jeesite.com All rights reserved. +# * No deletion without permission, or be held responsible to law. +# * +# * Author: ThinkGem@163.com +# * +# */ +echo "" +echo "[信息] 打包Web工程,编译Docker镜像。" +echo "" + +cd .. +mvn clean package docker:remove docker:build -Dmaven.test.skip=true -U + +cd bin \ No newline at end of file diff --git a/web-mini/bin/docker/Dockerfile b/web-mini/bin/docker/Dockerfile new file mode 100644 index 00000000..457af7ea --- /dev/null +++ b/web-mini/bin/docker/Dockerfile @@ -0,0 +1,21 @@ +FROM openjdk:8-slim +LABEL maintainer="ThinkGem@163.com" +ENV TZ "Asia/Shanghai" +ENV LANG C.UTF-8 +VOLUME /tmp +VOLUME /data + +WORKDIR /app + +#RUN mkdir WEB-INF +#ADD jeesite.lic ./WEB-INF +ADD ./maven/web.war ./app.war + +#ENV JAVA_OPTS "$JAVA_OPTS -Xms256m -Xmx1024m" +ENV JAVA_OPTS "$JAVA_OPTS -Dspring.profiles.active=prod" + +ENTRYPOINT jar -xvf app.war && rm app.war && cd WEB-INF && sh startup.sh + +EXPOSE 8980 + +#docker run -p 8980:8980 thinkgem/jeesite-web:5.3 diff --git a/web-mini/bin/init-data.bat b/web-mini/bin/init-data.bat new file mode 100644 index 00000000..b2052c03 --- /dev/null +++ b/web-mini/bin/init-data.bat @@ -0,0 +1,34 @@ +@echo off +rem /** +rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved. +rem * No deletion without permission, or be held responsible to law. +rem * +rem * Author: ThinkGem@163.com +rem */ +echo. +echo [Ϣ] ʼݿ⡣ +echo. +echo [Ϣ] Ҫ״ΰװ JeeSite װ Module ݱʼģѰװԶԡ +echo. +echo [Ϣ] v4.2 汾Ժ󣬹ٷʼݿDZȽϰȫģٷвκɾݱݵĽű +echo. +echo [Ϣ] ð汾ųǷΪȫȱݿٲ +echo. +pause + +%~d0 +cd %~dp0 + +cd .. + +call mvn clean compile -Dmaven.test.skip=true -U +echo. +echo [Ϣ] ɣ濪ʼʼݿ⡣ +echo. +pause + +set "MAVEN_OPTS=%MAVEN_OPTS% -Xms512m -Xmx1024m" +call mvn test -Dmaven.test.skip=false -Dtest=com.jeesite.test.InitData + +cd bin +pause \ No newline at end of file diff --git a/web-mini/bin/init-data.sh b/web-mini/bin/init-data.sh new file mode 100644 index 00000000..50132ce4 --- /dev/null +++ b/web-mini/bin/init-data.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +# /** +# * Copyright (c) 2013-Now http://jeesite.com All rights reserved. +# * No deletion without permission, or be held responsible to law. +# * +# * Author: ThinkGem@163.com +# * +# */ +echo "" +echo "[信息] 初始化数据库。" +echo "" +echo "[信息] 本操作主要用于首次安装 JeeSite 或后安装 Module 的数据表初始化,若模块已安装会自动忽略。" +echo "" +echo "[信息] 在 v4.2 版本以后,官方初始化数据库是比较安全的,官方代码中不会包含任何删除数据表及数据的脚本。" +echo "" +echo "[信息] 如果你是升级到该版本,不排除你是否升级完整,为安全起见,建议先备份数据库后再操作。" +echo "" +echo "请按回车键继续 ... " +read text + +cd .. + +mvn clean compile -Dmaven.test.skip=true -U +echo "" +echo "[信息] 依赖下载完成,下面开始初始化数据库。" +echo "" +echo "请按回车键继续 ... " +read text + +MAVEN_OPTS="$MAVEN_OPTS -Xms512m -Xmx1024m" +mvn test -Dmaven.test.skip=false -Dtest=com.jeesite.test.InitData + +cd bin +echo "请按回车键完成 ... " +read text \ No newline at end of file diff --git a/web-mini/bin/package.bat b/web-mini/bin/package.bat new file mode 100644 index 00000000..7613a836 --- /dev/null +++ b/web-mini/bin/package.bat @@ -0,0 +1,22 @@ +@echo off +rem /** +rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved. +rem * No deletion without permission, or be held responsible to law. +rem * +rem * Author: ThinkGem@163.com +rem */ +echo. +echo [Ϣ] Weḅwar/jarļ +echo. + +%~d0 +cd %~dp0 + +call mvn -v +echo. + +cd .. +call mvn clean package spring-boot:repackage -Dmaven.test.skip=true -U + +cd bin +pause \ No newline at end of file diff --git a/web-mini/bin/package.sh b/web-mini/bin/package.sh new file mode 100644 index 00000000..b066d9f3 --- /dev/null +++ b/web-mini/bin/package.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# /** +# * Copyright (c) 2013-Now http://jeesite.com All rights reserved. +# * No deletion without permission, or be held responsible to law. +# * +# * Author: ThinkGem@163.com +# */ +echo "" +echo "[信息] 打包Web工程,生成war/jar包文件。" +echo "" + +mvn -v +echo "" + +cd .. +mvn clean package spring-boot:repackage -Dmaven.test.skip=true -U + +cd bin \ No newline at end of file diff --git a/web-mini/bin/run-tomcat.bat b/web-mini/bin/run-tomcat.bat new file mode 100644 index 00000000..1d090eea --- /dev/null +++ b/web-mini/bin/run-tomcat.bat @@ -0,0 +1,20 @@ +@echo off +rem /** +rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved. +rem * No deletion without permission, or be held responsible to law. +rem * +rem * Author: ThinkGem@163.com +rem */ +echo. +echo [Ϣ] ʹ Spring Boot Tomcat Web ̡ +echo. + +%~d0 +cd %~dp0 + +cd .. +title %cd% +set "MAVEN_OPTS=%MAVEN_OPTS% -Xms512m -Xmx1024m" +call mvn clean spring-boot:run -Dmaven.test.skip=true + +pause \ No newline at end of file diff --git a/web-mini/bin/run-tomcat.sh b/web-mini/bin/run-tomcat.sh new file mode 100644 index 00000000..982b7958 --- /dev/null +++ b/web-mini/bin/run-tomcat.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# /** +# * Copyright (c) 2013-Now http://jeesite.com All rights reserved. +# * No deletion without permission, or be held responsible to law. +# * +# * Author: ThinkGem@163.com +# * +# */ +echo "" +echo "[信息] 使用 Spring Boot Tomcat 运行 Web 工程。" +echo "" + +cd .. +MAVEN_OPTS="$MAVEN_OPTS -Xms512m -Xmx1024m" +mvn clean spring-boot:run -Dmaven.test.skip=true \ No newline at end of file diff --git a/web-mini/bin/run-web.bat b/web-mini/bin/run-web.bat new file mode 100644 index 00000000..e03845ac --- /dev/null +++ b/web-mini/bin/run-web.bat @@ -0,0 +1,31 @@ +@echo off +rem /** +rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved. +rem * No deletion without permission, or be held responsible to law. +rem * +rem * Author: ThinkGem@163.com +rem */ +echo. +echo [Ϣ] WeḅWeb̡ +echo. + +%~d0 +cd %~dp0 + +rem Weḅʼ +cd .. +call mvn clean package spring-boot:repackage -Dmaven.test.skip=true -U +cd target +rem Weḅ + + +rem ޸ web.jar Ϊ jar +mkdir app +copy web.war app +cd app +jar -xvf web.war +del web.war +cd WEB-INF +call startup.bat + +pause \ No newline at end of file diff --git a/web-mini/bin/run-web.sh b/web-mini/bin/run-web.sh new file mode 100644 index 00000000..6cb3043f --- /dev/null +++ b/web-mini/bin/run-web.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# /** +# * Copyright (c) 2013-Now http://jeesite.com All rights reserved. +# * No deletion without permission, or be held responsible to law. +# * +# * Author: ThinkGem@163.com +# * +# */ +echo "" +echo "[信息] 打包Web工程,并运行Web工程。" +echo "" + +# 打包Web工程(开始) +cd .. +mvn clean package spring-boot:repackage -Dmaven.test.skip=true -U +cd target +# 打包Web工程(结束) + + +# 根据情况修改 web.jar 为您的 jar 包名称 +mkdir app +cp web.war ./app +cd app +jar -xvf web.war +rm web.war +cd WEB-INF +sh ./startup.sh diff --git a/web-mini/pom.xml b/web-mini/pom.xml new file mode 100644 index 00000000..cf2c4729 --- /dev/null +++ b/web-mini/pom.xml @@ -0,0 +1,132 @@ + + + 4.0.0 + + + com.jeesite + jeesite-parent + 5.5.1.springboot3-SNAPSHOT + ../parent/pom.xml + + + jeesite-web-mini + war + + Web 服务,最小化加载,可以甚至关闭数据源 + + JeeSite Web + http://jeesite.com + 2013-Now + + + + web + com.jeesite.modules.MiniApplication + + + 8980:8980 + + + + + + + + com.mysql + mysql-connector-j + runtime + + + + + com.jeesite + jeesite-framework + ${project.parent.version} + + + + + + + + ${finalName} + + + + + + org.springframework.boot + spring-boot-maven-plugin + + true + + + + + + org.apache.maven.plugins + maven-war-plugin + + ${finalName} + + + + + + org.apache.maven.plugins + maven-eclipse-plugin + + ${finalName} + + + + + + + + + thinkgem + WangZhen + thinkgem at 163.com + Project lead + +8 + + + + + JeeSite + http://jeesite.com + + + + + aliyun-repos + https://maven.aliyun.com/repository/public + true + false + + + jeesite-repos + https://maven.jeesite.net/repository/maven-public + + + + + aliyun-repos + https://maven.aliyun.com/repository/public + true + false + + + jeesite-repos + https://maven.jeesite.net/repository/maven-public + + + + diff --git a/web-mini/src/main/java/com/jeesite/modules/MiniApplication.java b/web-mini/src/main/java/com/jeesite/modules/MiniApplication.java new file mode 100644 index 00000000..d3128c9d --- /dev/null +++ b/web-mini/src/main/java/com/jeesite/modules/MiniApplication.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2013-Now http://jeesite.com All rights reserved. + * No deletion without permission, or be held responsible to law. + */ +package com.jeesite.modules; + +import com.jeesite.common.config.Global; +import com.jeesite.common.io.FileUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; + +/** + * Application + * @author ThinkGem + */ +@SpringBootApplication +public class MiniApplication extends SpringBootServletInitializer { + + private static Logger logger = LoggerFactory.getLogger(MiniApplication.class); + + public static void main(String[] args) { + SpringApplication.run(MiniApplication.class, args); + logger.info( + "\r\n\r\n==============================================================\r\n" + + "\r\n 启动完成,系统监控地址:http://127.0.0.1:" + + Global.getProperty("server.port") + FileUtils.path("/" + + Global.getProperty("server.servlet.context-path") + + Global.getAdminPath()) + "state/server/index" + + "\r\n\r\n==============================================================\r\n"); + } + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { + this.setRegisterErrorPageFilter(false); // 错误页面有容器来处理,而不是SpringBoot + return builder.sources(MiniApplication.class); + } + +} \ No newline at end of file diff --git a/web-mini/src/main/resources/config/application-prod.yml b/web-mini/src/main/resources/config/application-prod.yml new file mode 100644 index 00000000..1cfccc75 --- /dev/null +++ b/web-mini/src/main/resources/config/application-prod.yml @@ -0,0 +1,45 @@ + +# 使用环境配置,只需 JVM 参数里加:-Dspring.profiles.active=prod + +#======================================# +#========== Server settings ===========# +#======================================# + +server: + + port: 8980 + servlet: + context-path: /js + +#======================================# +#========== Database sttings ==========# +#======================================# + +# 数据库连接 +jdbc: + + # Mysql 数据库配置 + type: mysql + driver: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://192.168.56.1:3306/jeesite?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=Asia/Shanghai + username: jeesite + password: jeesite + testSql: SELECT 1 + + # 数据库连接池配置 + pool: + + # 初始化连接数 + init: 1 + # 最小连接数 + minIdle: 3 + # 最大连接数 + maxActive: 20 + +#======================================# +#========== Spring settings ===========# +#======================================# + +# 日志配置 +logging: + config: classpath:config/logback-spring-prod.xml \ No newline at end of file diff --git a/web-mini/src/main/resources/config/application.yml b/web-mini/src/main/resources/config/application.yml new file mode 100644 index 00000000..be386a8c --- /dev/null +++ b/web-mini/src/main/resources/config/application.yml @@ -0,0 +1,174 @@ + +#======================================# +#========== Project settings ==========# +#======================================# + +# 产品或项目名称、软件开发公司名称 +productName: JeeSite Demo +companyName: ThinkGem + +# 产品版本、版权年份 +productVersion: V5.5 +copyrightYear: 2023 + +# 是否演示模式 +demoMode: false + +# 专为分离端提供接口服务 +apiMode: false + +#======================================# +#========== Server settings ===========# +#======================================# + +server: + + port: 8980 + servlet: + context-path: /js + register-default-servlet: false +# encoding.enabled: true + tomcat: + uri-encoding: UTF-8 + # 表单请求数据的最大大小 + max-http-form-post-size: 20MB +# # 进程的最大连接数 +# max-connections: 8192 +# # 连接数满后的排队个数 +# accept-count: 100 +# # 线程数最大和最小个数 +# threads: +# max: 200 +# min-spare: 10 + + # 当 Nginx 为 https,tomcat 为 http 时,设置该选项为 true + schemeHttps: false + +#======================================# +#========== Database sttings ==========# +#======================================# + +# 数据库连接(默认关闭,如果和 web.core.enabled 同时开启可使用如下功能: +# 配置参数:http://127.0.0.1:8980/js/a/sys/config/list +# 模块管理:http://127.0.0.1:8980/js/a/sys/module/list +# 字典管理:http://127.0.0.1:8980/js/a/sys/dictType/list +jdbc: + +# # Mysql 数据库配置 +# type: mysql +# driver: com.mysql.cj.jdbc.Driver +# url: jdbc:mysql://127.0.0.1:3306/jeesite_v5?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=Asia/Shanghai +# username: root +# password: 123456 +# testSql: SELECT 1 + + # 数据库连接池配置 + pool: + + # 初始化连接数 + init: 1 + # 最小连接数 + minIdle: 3 + # 最大连接数 + maxActive: 20 + +#======================================# +#========== Framework settings ========# +#======================================# + +spring: + + # 应用程序名称 + application: + name: jeesite-web + + # 环境名称(注意:不可设置为 test 它是单元测试专用的名称) + profiles: + active: default + + # 打印横幅 + main: + bannerMode: "off" + + # MVC 映射匹配策略 + mvc: + pathmatch: + matching-strategy: ANT_PATH_MATCHER + + # JTA事务 + jta: + enabled: false + + # 缓存配置 + cache: + # 缓存及会话共享(专业版) + isClusterMode: false + +# 日志配置 +logging: + config: classpath:config/logback-spring.xml + +# 管理基础路径 +adminPath: /a + +# 前端基础路径 +frontPath: /f + +# 用户权限相关 +user: + enabled: false + +# 国际化管理 +lang: + enabled: false + +# 任务调度 +job: + enabled: false + +# 代码生成 +gen: + enabled: false + +# 系统监控(默认开启,可关闭)访问地址如下: +# 服务监控:http://127.0.0.1:8980/js/a/state/server/index +# 缓存监控:http://127.0.0.1:8980/js/a/state/cache/index +state: + enabled: true + +# Web 相关 +web: + + # MVC拦截器(访问日志和手机视图) + interceptor: + log: + enabled: false + mobile: + enabled: false + + # 是否启用核心内置功能的Controller加载 + core: + enabled: false + + # 在线API文档工具 + swagger: + enabled: false + +# Mapper文件刷新线程 +mybatis: + mapper: + refresh: + enabled: false + +# 文件上传 +file: + enabled: false + isFileStreamDown: false + +# 消息提醒中心 +msg: + enabled: false + +#======================================# +#========== Project settings ==========# +#======================================# diff --git a/web-mini/src/main/resources/config/beetl-core.properties b/web-mini/src/main/resources/config/beetl-core.properties new file mode 100644 index 00000000..405f5702 --- /dev/null +++ b/web-mini/src/main/resources/config/beetl-core.properties @@ -0,0 +1,158 @@ +#######默认配置(/org/beetl/core/beetl-default.properties) +ENGINE=org.beetl.core.engine.FastRuntimeEngine +DELIMITER_PLACEHOLDER_START=${ +DELIMITER_PLACEHOLDER_END=} +DELIMITER_PLACEHOLDER_START2="#{ +DELIMITER_PLACEHOLDER_END2=}" +DELIMITER_STATEMENT_START=<% +DELIMITER_STATEMENT_END=%> +DELIMITER_STATEMENT_START2=//# +DELIMITER_STATEMENT_END2= +DIRECT_BYTE_OUTPUT = FALSE +HTML_TAG_SUPPORT = true +HTML_TAG_FLAG = # +HTML_TAG_BINDING_ATTRIBUTE = var,export +HTML_TAG_ATTR_CONVERT=com.jeesite.common.beetl.text.BlankAttributeNameConvert +NATIVE_CALL = TRUE +TEMPLATE_CHARSET = UTF-8 +ERROR_HANDLER = com.jeesite.common.beetl.handler.LoggerErrorHandler +NATIVE_SECUARTY_MANAGER = org.beetl.core.DefaultNativeSecurityManager +RESOURCE_LOADER = org.beetl.core.resource.ClasspathResourceLoader +MVC_STRICT = FALSE + +#导入调用静态方法类 +IMPORT_PACKAGE= + +##导入JeeSite调用静态方法类(自动合并IMPORT_PACKAGE设置) +IMPORT_PACKAGE_core=\ + com.jeesite.common.config.;\ + com.jeesite.common.codec.;\ + com.jeesite.common.collect.;\ + com.jeesite.common.idgen.;\ + com.jeesite.common.lang.;\ + com.jeesite.common.mapper.;\ + com.jeesite.common.reflect.;\ + com.jeesite.common.security.;\ + com.jeesite.common.web.http.;\ + com.jeesite.modules.sys.utils.;\ + com.jeesite.common.entity.;\ + com.jeesite.common.service.;\ + com.jeesite.common.utils.;\ + +### 资源配置,resource后的属性只限于特定ResourceLoader #### +#classpath 跟路径,与框架集成的时候,此配置会被框架代码覆盖而不能生效 +RESOURCE.root = views +#是否检测文件变化 +RESOURCE.autoCheck = TRUE +#自定义脚本方法文件位置 +RESOURCE.functionRoot = functions +#自定义脚本方法文件的后缀 +RESOURCE.functionSuffix = html +#自定义标签文件位置 +RESOURCE.tagRoot = htmltags +#自定义标签文件后缀 +RESOURCE.tagSuffix = html + +#如果采用beetl集成的web应用,可以在渲染模板前调用如下类,此类必须实现WebRenderExt接口 +WEBAPP_EXT = + +#允许html function or Tag 使用特殊的定界符,因为function或者tag通常有大量beetl语句 +FUNCTION_TAG_LIMITER= + +##### 扩展,也可以通过特定框架注册############## +## 内置的方法 +FN.date = org.beetl.ext.fn.DateFunction +FN.nvl = org.beetl.ext.fn.NVLFunction +FN.debug = org.beetl.ext.fn.DebugFunction +#兼容以前版本,用has代替 +FN.exist = org.beetl.ext.fn.CheckExistFunction +FN.has = org.beetl.ext.fn.CheckExistFunction +FN.printf = org.beetl.ext.fn.Printf +FN.decode = org.beetl.ext.fn.DecodeFunction +FN.assert = org.beetl.ext.fn.AssertFunction +FN.print = org.beetl.ext.fn.Print +FN.println = org.beetl.ext.fn.Println +FN.printFile = org.beetl.ext.fn.PrintFile +FN.trunc = org.beetl.ext.fn.TruncFunction +FN.trim = org.beetl.ext.fn.TruncFunction2 +#兼容以前版本 empty,用isEmpty代替 +FN.empty = org.beetl.ext.fn.EmptyFunction +FN.qmark = org.beetl.ext.fn.QuestionMark +FN.isEmpty = org.beetl.ext.fn.EmptyExpressionFunction +FN.isNotEmpty = org.beetl.ext.fn.IsNotEmptyExpressionFunction +FN.parseInt = org.beetl.ext.fn.ParseInt +FN.parseLong = org.beetl.ext.fn.ParseLong +FN.parseDouble= org.beetl.ext.fn.ParseDouble +FN.range = org.beetl.ext.fn.Range +FN.flush = org.beetl.ext.fn.Flush +FN.json = org.beetl.ext.fn.Json +FN.pageCtx = org.beetl.ext.fn.PageContextFunction +FN.type.new=org.beetl.ext.fn.TypeNewFunction +FN.type.name=org.beetl.ext.fn.TypeNameFunction +FN.type.fullName=com.jeesite.common.beetl.ext.fn.TypeFullNameFunction +FN.global=org.beetl.ext.fn.DynamicGlobalValueFunction +FN.allGlobal=org.beetl.ext.fn.AllGlobaAsJsonlFunction +FN.hasAttribute=org.beetl.ext.fn.HasAttributeFunction +FN.env=org.beetl.ext.fn.EnvFunction +FN.parentTag=org.beetl.ext.fn.ParentTagFunction + +##JeeSite自定义函数 +FN.isBlank = com.jeesite.common.beetl.ext.fn.IsBlank +FN.isNotBlank = com.jeesite.common.beetl.ext.fn.IsNotBlank +FN.toBoolean = com.jeesite.common.beetl.ext.fn.ToBoolean +FN.toInteger = com.jeesite.common.beetl.ext.fn.ToInteger +FN.toJson = com.jeesite.common.beetl.ext.fn.ToJson +FN.fromJson = com.jeesite.common.beetl.ext.fn.FromJson +FN.hasPermi = com.jeesite.common.beetl.ext.fn.HasPermi +FN.hasRole = com.jeesite.common.beetl.ext.fn.HasRole +FN.cookie = com.jeesite.common.beetl.ext.fn.Cookie +FN.lang = com.jeesite.common.beetl.ext.fn.Lang +FN.text = com.jeesite.common.beetl.ext.fn.Text +FN.user = com.jeesite.common.beetl.ext.fn.User + +##内置的功能包 +FNP.strutil = org.beetl.ext.fn.StringUtil +FNP.reg = org.beetl.ext.fn.RegxFunctionUtil +FNP.array = org.beetl.ext.fn.ArrayUtil +FNP.dict = com.jeesite.common.beetl.ext.fn.DictUtil + +##内置的格式化函数 +FT.dateFormat = org.beetl.ext.format.DateFormat +FT.numberFormat = com.jeesite.common.beetl.ext.format.NumberFormat +FT.xss = com.jeesite.common.beetl.ext.format.XssFormat + +##内置的默认格式化函数 +FTC.java.util.Date = org.beetl.ext.format.DateFormat +FTC.java.sql.Date = org.beetl.ext.format.DateFormat +FTC.java.sql.Time = org.beetl.ext.format.DateFormat +FTC.java.sql.Timestamp = org.beetl.ext.format.DateFormat +FTC.java.lang.Short = com.jeesite.common.beetl.ext.format.NumberFormat +FTC.java.lang.Long = com.jeesite.common.beetl.ext.format.NumberFormat +FTC.java.lang.Integer = com.jeesite.common.beetl.ext.format.NumberFormat +FTC.java.lang.Float = com.jeesite.common.beetl.ext.format.NumberFormat +FTC.java.lang.Double = com.jeesite.common.beetl.ext.format.NumberFormat +FTC.java.math.BigInteger = com.jeesite.common.beetl.ext.format.NumberFormat +FTC.java.math.BigDecimal = com.jeesite.common.beetl.ext.format.NumberFormat +FTC.java.util.concurrent.atomic.AtomicLong = com.jeesite.common.beetl.ext.format.NumberFormat +FTC.java.util.concurrent.atomic.AtomicInteger = com.jeesite.common.beetl.ext.format.NumberFormat + +##虚拟属性 无 +## 标签类 +TAG.include= org.beetl.ext.tag.IncludeTag +TAG.includeFileTemplate= org.beetl.ext.tag.IncludeTag +TAG.incdlueJSP= org.beetl.ext.jsp.IncludeJSPTag +TAG.layout= org.beetl.ext.tag.LayoutTag +TAG.delete= org.beetl.ext.tag.DeleteTag +#TAG.htmltag= org.beetl.ext.tag.HTMLTagSupportWrapper +#TAG.htmltagvar= org.beetl.ext.tag.HTMLTagVarBindingWrapper +TAG.htmltag= com.jeesite.common.beetl.ext.tag.HTMLTag +TAG.htmltagvar= com.jeesite.common.beetl.ext.tag.HTMLTagVar +TAG.htmltagexport= com.jeesite.common.beetl.ext.tag.HTMLTagVar +TAG.cache= org.beetl.ext.tag.cache.CacheTag +# 一个html风格的include和layout <#html:include file=""> +TAG.html.include= org.beetl.ext.tag.html.IncludeResourceHtmlTag +TAG.html.layout= org.beetl.ext.tag.html.LayoutResourceHtmlTag +TAG.html.set= org.beetl.ext.tag.html.SetHtmlTag +TAG.html.if= org.beetl.ext.tag.html.IfHtmlTag +TAG.html.foreach= org.beetl.ext.tag.html.ForeachHtmlTag +#TAG.includeUrl=org.beetl.ext.tag.IncludeUrlTag diff --git a/web-mini/src/main/resources/config/logback-spring-prod.xml b/web-mini/src/main/resources/config/logback-spring-prod.xml new file mode 100644 index 00000000..5a16c941 --- /dev/null +++ b/web-mini/src/main/resources/config/logback-spring-prod.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + %d{MM-dd HH:mm:ss.SSS} %clr(%-5p) %clr([%-39logger{39}]){cyan} - %m%n%wEx + + + + + + ${log.path}/debug.log + + ${log.path}/debug.%d{yyyy-MM-dd}.%i.log.zip + 50MB + 30 + + + %d{yyyy-MM-dd HH:mm:ss.SSS} %-5p ${PID:- } [%15.15t] [%-39logger{39}] [%X{TRACE_ID}] - %m%n%wEx + + + + + + + ${log.path}/error.log + + ${log.path}/error.%d{yyyy-MM-dd}.%i.log.zip + 50MB + 30 + + + %d{yyyy-MM-dd HH:mm:ss.SSS} %-5p ${PID:- } [%15.15t] [%-39logger{39}] [%X{TRACE_ID}] - %m%n%wEx + + + ERROR + + + + + + + + + + + \ No newline at end of file diff --git a/web-mini/src/main/resources/config/logback-spring.xml b/web-mini/src/main/resources/config/logback-spring.xml new file mode 100644 index 00000000..9bc86e57 --- /dev/null +++ b/web-mini/src/main/resources/config/logback-spring.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + %d{MM-dd HH:mm:ss.SSS} %clr(%-5p) %clr([%-39logger{39}]){cyan} - %m%n%wEx + + + + + + ${log.path}/debug.log + + ${log.path}/debug.%d{yyyy-MM-dd}.%i.log.zip + 50MB + 30 + + + %d{yyyy-MM-dd HH:mm:ss.SSS} %-5p ${PID:- } [%15.15t] [%-39logger{39}] [%X{TRACE_ID}] - %m%n%wEx + + + + + + + ${log.path}/error.log + + ${log.path}/error.%d{yyyy-MM-dd}.%i.log.zip + 50MB + 30 + + + %d{yyyy-MM-dd HH:mm:ss.SSS} %-5p ${PID:- } [%15.15t] [%-39logger{39}] [%X{TRACE_ID}] - %m%n%wEx + + + ERROR + + + + + + + + + + + \ No newline at end of file diff --git a/web-mini/src/main/resources/config/logger-core.xml b/web-mini/src/main/resources/config/logger-core.xml new file mode 100644 index 00000000..ee27863f --- /dev/null +++ b/web-mini/src/main/resources/config/logger-core.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/web-mini/src/main/resources/mybatis/mybatis-config.xml b/web-mini/src/main/resources/mybatis/mybatis-config.xml new file mode 100644 index 00000000..b1a85c8f --- /dev/null +++ b/web-mini/src/main/resources/mybatis/mybatis-config.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web-mini/src/main/resources/static/common/common.css b/web-mini/src/main/resources/static/common/common.css new file mode 100644 index 00000000..f94b7e40 --- /dev/null +++ b/web-mini/src/main/resources/static/common/common.css @@ -0,0 +1,5 @@ +/*! + * Copyright (c) 2013-Now http://jeesite.com All rights reserved. + * No deletion without permission, or be held responsible to law. + * 项目自定义的公共CSS,可覆盖jeesite.css里的样式 + */ diff --git a/web-mini/src/main/resources/static/common/common.js b/web-mini/src/main/resources/static/common/common.js new file mode 100644 index 00000000..14bccc01 --- /dev/null +++ b/web-mini/src/main/resources/static/common/common.js @@ -0,0 +1,5 @@ +/*! + * Copyright (c) 2013-Now http://jeesite.com All rights reserved. + * No deletion without permission, or be held responsible to law. + * 项目自定义的公共JavaScript,可覆盖jeesite.js里的方法 + */ diff --git a/web-mini/src/main/resources/static/favicon.png b/web-mini/src/main/resources/static/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..72734e51c4168a8a0e9f4ebf4e2b7f648dfc853f GIT binary patch literal 4794 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 literal 0 HcmV?d00001 diff --git a/web-mini/src/main/resources/views/include/csslibs.html b/web-mini/src/main/resources/views/include/csslibs.html new file mode 100644 index 00000000..7dc9d5db --- /dev/null +++ b/web-mini/src/main/resources/views/include/csslibs.html @@ -0,0 +1,23 @@ +<%/* Copyright (c) 2013-Now http://jeesite.com All rights reserved. + * No deletion without permission, or be held responsible to law. */ %> + + + + +<% if (@ListUtils.inString('zTree', libs!)){ %> + +<% } %> +<% if (@ListUtils.inString('tabPage', libs!)){ %> + +<% } %> +<% if (@ListUtils.inString('dataGrid', libs!)){ %> + +<% } %> +<% if (@ListUtils.inString('layout', libs!)){ %> + +<% } %> +<% if (@ListUtils.inString('fileupload', libs!)){ %> + +<% } %> + + diff --git a/web-mini/src/main/resources/views/include/head.html b/web-mini/src/main/resources/views/include/head.html new file mode 100644 index 00000000..8497d414 --- /dev/null +++ b/web-mini/src/main/resources/views/include/head.html @@ -0,0 +1,11 @@ +<%/* Copyright (c) 2013-Now http://jeesite.com All rights reserved. + * No deletion without permission, or be held responsible to law. */%> + + + + +${(isNotBlank(title!) ? title! + ' - ' : '') + @Global.getConfig('productName')} + + + + diff --git a/web-mini/src/main/resources/views/include/jslibs.html b/web-mini/src/main/resources/views/include/jslibs.html new file mode 100644 index 00000000..b8a440bd --- /dev/null +++ b/web-mini/src/main/resources/views/include/jslibs.html @@ -0,0 +1,48 @@ +<%/* Copyright (c) 2013-Now http://jeesite.com All rights reserved. + * No deletion without permission, or be held responsible to law. */ %> + + + + + +<% if (@ListUtils.inString('zTree', libs!)){ %> + +<% } %> +<% if (@ListUtils.inString(['tabPage', 'dataGrid', 'fileupload'], libs!)){ %> + +<% } %> +<% if (@ListUtils.inString('tabPage', libs!)){ %> + + + +<% } %> +<% if (@ListUtils.inString('dataGrid', libs!)){ %> + + + +<% } %> +<% if (@ListUtils.inString('validate', libs!)){ %> + + + +<% } %> +<% if (@ListUtils.inString('layout', libs!)){ %> + + + +<% } %> +<% if (@ListUtils.inString('inputmask', libs!)){ %> + +<% } %> +<% if (@ListUtils.inString('fileupload', libs!)){ %> + + + +<% } %> +<% if (@ListUtils.inString('ueditor', libs!)){ %> + + + +<% } %> + + diff --git a/web-mini/src/main/resources/views/layouts/default.html b/web-mini/src/main/resources/views/layouts/default.html new file mode 100644 index 00000000..dfc14e55 --- /dev/null +++ b/web-mini/src/main/resources/views/layouts/default.html @@ -0,0 +1,12 @@ +<%/* Copyright (c) 2013-Now http://jeesite.com All rights reserved. + * No deletion without permission, or be held responsible to law. */ %> +<% print('<'+'!DOC'+'TYPE html'+'>'); %> +<% print('<'+'html'+'><'+'head'+'>'); %> +<% include('/include/head.html', {title: text(title!)}){} %> +<% include('/include/csslibs.html', {libs: libs!}){} %> + +<% if (!@ListUtils.inString('layout', libs!)){ %> +
${layoutContent}
+<% }else{ %>${layoutContent}<% } %> + +<% include('/include/jslibs.html', {libs: libs!}){} %> diff --git a/web-mini/src/main/webapp/WEB-INF/startup.bat b/web-mini/src/main/webapp/WEB-INF/startup.bat new file mode 100644 index 00000000..7d4f47a3 --- /dev/null +++ b/web-mini/src/main/webapp/WEB-INF/startup.bat @@ -0,0 +1,51 @@ +@echo off +rem /** +rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved. +rem * No deletion without permission, or be held responsible to law. +rem * +rem * Author: ThinkGem@163.com +rem */ +echo. +echo [Ϣ] Web̡ +echo. +rem pause +rem echo. + +%~d0 +cd %~dp0 + +title %cd% + +rem JDKĿ¼ +rem set "JAVA_HOME=%cd%\jdk1.8.0_x64" + +rem · +set "CLASS_PATH=%cd%/../" + +rem ŻJVM +set "JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx1024m" + +rem ʽһⲿԶļ飩 +rem set "JAVA_OPTS=%JAVA_OPTS% -Dspring.config.location=%cd%\app.yml" + +rem ʽûƣزͬļ +rem set "JAVA_OPTS=%JAVA_OPTS% -Dspring.profiles.active=prod" + +if "%JAVA_HOME%" == "" goto noJavaHome +if not "%JAVA_HOME%" == "" goto gotJavaHome +goto end + +:noJavaHome +set RUN_JAVA=java +goto runJava + +:gotJavaHome +set "RUN_JAVA=%JAVA_HOME%\bin\java" +goto runJava + +:runJava +call "%RUN_JAVA%" -cp %CLASS_PATH% %JAVA_OPTS% org.springframework.boot.loader.WarLauncher +goto end + +:end +pause diff --git a/web-mini/src/main/webapp/WEB-INF/startup.sh b/web-mini/src/main/webapp/WEB-INF/startup.sh new file mode 100644 index 00000000..2aeeb0a4 --- /dev/null +++ b/web-mini/src/main/webapp/WEB-INF/startup.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# /** +# * Copyright (c) 2013-Now http://jeesite.com All rights reserved. +# * No deletion without permission, or be held responsible to law. +# * +# * Author: ThinkGem@163.com +# */ +echo "" +echo "[信息] 运行Web工程。" +echo "" + +# 设置JDK目录 +# JAVA_HOME="$PWD/jdk1.8.0_x64" + +# 设置类加载路径 +CLASS_PATH="$PWD/../" + +# 优化JVM参数 +# JAVA_OPTS="$JAVA_OPTS -Xms512m -Xmx1024m" + +# 方式一、配置外部自定义的属性文件(建议) +# JAVA_OPTS="$JAVA_OPTS -Dspring.config.location=$PWD/app.yml" + +# 方式二、配置环境名称,加载不同的属性文件 +# JAVA_OPTS="$JAVA_OPTS -Dspring.profiles.active=prod" + +if [ -z "$JAVA_HOME" ]; then + RUN_JAVA=java +else + RUN_JAVA="$JAVA_HOME"/bin/java +fi + +exec $RUN_JAVA -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher \ No newline at end of file