重构 jeesite-ai 代码目录,新增 parent-ai,重命名 cms-ai 为 ai-cms

This commit is contained in:
thinkgem
2025-10-19 13:16:33 +08:00
parent ac4d05cda7
commit 5dfb735186
48 changed files with 414 additions and 199 deletions

View File

@@ -0,0 +1,20 @@
## 介绍
jeesite-web-ai-cms 拷贝自 jeesite-web 只保留了 CMS 和 AI 模块的引用,
可直接运行 AiCmsApplication.java 文件,启动一个 Web 服务。
启动 Web 服务后,可通过网页浏览器访问 JeeSite 系统。
## 更多介绍
1. <https://jeesite.com/docs/cms-ai/>
2. <https://jeesite.com/docs/cms/>
## 文档
部署文档http://jeesite.com/docs/install-deploy/
常见问题http://jeesite.com/docs/faq/
更多文档http://jeesite.com/docs

View File

@@ -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 [<5B><>Ϣ] <20><><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>Docker<65><72><EFBFBD><EFBFBD>
echo.
%~d0
cd %~dp0
cd ..
call mvn clean package docker:remove docker:build -Dmaven.test.skip=true -U
cd bin
pause

View File

@@ -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

View File

@@ -0,0 +1,22 @@
FROM docker.m.daocloud.io/openjdk:17
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 if [ -f "app.war" ]; then jar -xvf app.war && rm app.war; \
fi && cd WEB-INF && sh startup.sh && cd WEB-INF && sh startup.sh
EXPOSE 8980
#docker run -p 8980:8980 thinkgem/jeesite-web:5.10

View File

@@ -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 [<5B><>Ϣ] <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>ݿ⡣
echo.
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD>״ΰ<D7B4>װ JeeSite <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ Module <20><><EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>Ѱ<EFBFBD>װ<EFBFBD><D7B0><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>ԡ<EFBFBD>
echo.
echo [<5B><>Ϣ] <20>ٷ<EFBFBD>Ĭ<EFBFBD><C4AC><EFBFBD><EFBFBD>ij<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>ݿ⹤<DDBF><E2B9A4><EFBFBD>DZȽϰ<C8BD>ȫ<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>û<EFBFBD>а<EFBFBD><D0B0><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵĽű<C4BD><C5B1><EFBFBD>
echo.
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ð汾<C3B0><E6B1BE><EFBFBD><EFBFBD><EFBFBD>ų<EFBFBD><C5B3><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȱ<EFBFBD><C8B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD>ٲ<EFBFBD><D9B2><EFBFBD><EFBFBD><EFBFBD>
echo.
pause
%~d0
cd %~dp0
cd ..
call mvn clean compile -Dmaven.test.skip=true -U
echo.
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD><EFBFBD>ʼ<E6BFAA><CABC>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>ݿ⡣
echo.
pause
set "MAVEN_OPTS=%MAVEN_OPTS% -Xms512m -Xmx1024m"
call mvn test -Dmaven.test.skip=false -Dtest=com.jeesite.test.InitData
cd bin
pause

View File

@@ -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 "[信息] 官方默认提供的初始化数据库工具是比较安全的,她没有包含删除您的业务数据表及数据的脚本。"
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

View File

@@ -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 [<5B><>Ϣ] <20><><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>war/jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
echo.
%~d0
cd %~dp0
call mvn -v
echo.
cd ..
call mvn clean package spring-boot:repackage -Dmaven.test.skip=true -U
cd bin
pause

View File

@@ -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

View File

@@ -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 [<5B><>Ϣ] ʹ<><CAB9> Spring Boot Tomcat <20><><EFBFBD><EFBFBD> Web <20><><EFBFBD>̡<EFBFBD>
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

View File

@@ -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

View File

@@ -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 [<5B><>Ϣ] <20><><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̡<EFBFBD>
echo.
%~d0
cd %~dp0
rem <20><><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̣<EFBFBD><CCA3><EFBFBD>ʼ<EFBFBD><CABC>
cd ..
call mvn clean package spring-boot:repackage -Dmaven.test.skip=true -U
cd target
rem <20><><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
rem web.war <20><> pom.xml <20><> finalName<6D><65>packaging һ<><D2BB>
mkdir app
copy web.war app
cd app
jar -xvf web.war
del web.war
cd WEB-INF
call startup.bat
pause

View File

@@ -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.war 与 pom.xml 中 finalName、packaging 一致
mkdir app
cp web.war ./app
cd app
jar -xvf web.war
rm web.war
cd WEB-INF
sh ./startup.sh

153
web-ai/web-ai-cms/pom.xml Normal file
View File

@@ -0,0 +1,153 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-parent</artifactId>
<version>5.14.0.springboot3-SNAPSHOT</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>
<artifactId>jeesite-web-ai-cms</artifactId>
<packaging>war</packaging>
<description>Web AI CMS 服务</description>
<name>JeeSite Web AI</name>
<url>http://jeesite.com</url>
<inceptionYear>2013-Now</inceptionYear>
<properties>
<finalName>web</finalName><!-- war 或 jar 包的名称 -->
<start-class>com.jeesite.modules.AiCmsApplication</start-class>
<!-- docker setting -->
<docker.run.port>8980:8980</docker.run.port>
</properties>
<dependencies>
<!-- 核心模块 --><!--suppress VulnerableLibrariesLocal -->
<dependency>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-module-core</artifactId>
<version>${project.parent.version}</version>
</dependency>
<!-- 测试模块 -->
<dependency>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-module-test</artifactId>
<version>${project.parent.version}</version>
</dependency>
<!-- 内容管理模块 -->
<dependency>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-module-cms</artifactId>
<version>${project.parent.version}</version>
</dependency>
<!-- 内容管理 AI + RAG 模块 -->
<dependency>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-module-ai-cms</artifactId>
<version>${project.parent.version}</version>
</dependency>
<!-- Vue发布包 https://gitee.com/thinkgem/jeesite-vue -->
<dependency>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-vue-dist</artifactId>
<version>5.14.0-SNAPSHOT</version>
</dependency>
<!-- 热部署工具
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency> -->
</dependencies>
<build>
<finalName>${finalName}</finalName>
<!--<outputDirectory>${project.basedir}/src/main/webapp/WEB-INF/classes/</outputDirectory>-->
<plugins>
<!-- Spring Boot -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
<!-- war插件war包名称不带版本号 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<warName>${finalName}</warName>
</configuration>
</plugin>
<!-- Eclipse 插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<wtpContextName>${finalName}</wtpContextName>
</configuration>
</plugin>
</plugins>
</build>
<developers>
<developer>
<id>thinkgem</id>
<name>WangZhen</name>
<email>thinkgem at 163.com</email>
<roles><role>Project lead</role></roles>
<timezone>+8</timezone>
</developer>
</developers>
<organization>
<name>JeeSite</name>
<url>http://jeesite.com</url>
</organization>
<repositories>
<repository>
<id>aliyun-repos</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
</repository>
<repository>
<id>jeesite-repos</id>
<url>https://maven.jeesite.net/repository/maven-public</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>aliyun-repos</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
</pluginRepository>
<pluginRepository>
<id>jeesite-repos</id>
<url>https://maven.jeesite.net/repository/maven-public</url>
</pluginRepository>
</pluginRepositories>
</project>

View File

@@ -0,0 +1,54 @@
/**
* 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 com.jeesite.common.lang.StringUtils;
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 AiCmsApplication extends SpringBootServletInitializer {
private static final Logger logger = LoggerFactory.getLogger(AiCmsApplication.class);
public static void main(String[] args) {
SpringApplication.run(AiCmsApplication.class, args);
String vuePath = Global.getProperty("vuePath");
String ctxPath = Global.getProperty("server.servlet.context-path");
if (StringUtils.isNoneBlank(vuePath) && !StringUtils.equals(ctxPath, "/js")) {
logger.info(
"\n\n==============================================================\n"
+ "\n 提示:您修改了 server.servlet.context-path 参数,需要您"
+ "\n 同步修改 _app.config.js 中的 VITE_GLOB_API_URL_PREFIX 参数 "
+ "\n 请修改为 VITE_GLOB_API_URL_PREFIX=\"{}\" 并重新打包 Vue\n"
+ "\n==============================================================\n",
ctxPath);
}
logger.info(
"\n\n==============================================================\n"
+ "\n 启动完成访问地址http://127.0.0.1:{}\n"
+ "\n 默认管理账号: system 密码: admin\n"
+ "\n==============================================================\n",
Global.getProperty("server.port") + FileUtils.path("/"
+ Global.getProperty("server.servlet.context-path")));
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
this.setRegisterErrorPageFilter(false); // 错误页面有容器来处理而不是SpringBoot
return builder.sources(AiCmsApplication.class);
}
}

View File

@@ -0,0 +1,41 @@
# 使用环境配置,只需 JVM 参数里加:-Dspring.profiles.active=prod
server:
port: 8980
servlet:
context-path: /js
# 数据库连接
jdbc:
# Mysql 数据库配置
type: mysql
driver: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.56.1:3306/jeesite?useSSL=false&allowPublicKeyRetrieval=true&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
# 日志配置
logging:
config: classpath:config/logback-spring-prod.xml
# MyBatis 相关
mybatis:
# Mapper文件刷新线程
mapper:
refresh:
enabled: false

View File

@@ -0,0 +1,248 @@
#======================================#
#========== Project settings ==========#
#======================================#
# 产品或项目名称、软件开发公司名称
productName: JeeSite AI CMS
companyName: ThinkGem
# 产品版本、版权年份
productVersion: V5.14
copyrightYear: 2025
# 是否演示模式
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-parameter-count: 10000
# # 文件上传的表单请求参数个数限制
# max-part-count: 50
# # 进程的最大连接数
# max-connections: 8192
# # 连接数满后的排队个数
# accept-count: 100
# # 线程数最大和最小个数
# threads:
# max: 200
# min-spare: 10
# 当 Nginx 为 httpstomcat 为 http 时,设置该选项为 true
schemeHttps: false
#======================================#
#========= Database settings ==========#
#======================================#
# 数据库连接
jdbc:
# Mysql 数据库配置
type: mysql
driver: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/jeesite_v5?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
username: root
password: 123456
testSql: SELECT 1
# 连接信息加密
encrypt:
# 加密连接用户名
username: false
# 加密连接密码
password: false
# 数据库连接池配置
pool:
# 初始化连接数
init: 1
# 最小空闲连接数
minIdle: 3
# 最大激活连接数
maxActive: 20
#======================================#
#========== Spring settings ===========#
#======================================#
spring:
# 应用程序名称
application:
name: jeesite-web-ai
# 环境名称(注意:不可设置为 test 它是单元测试专用的名称)
profiles:
active: default
# 打印横幅
main:
banner-mode: "off"
lazy-initialization: false
# # MVC 映射匹配策略
# mvc:
# pathmatch:
# matching-strategy: ANT_PATH_MATCHER
# 日志配置fatal、error、warn、info、debug
logging:
config: classpath:config/logback-spring.xml
# level:
# root: warn
# com.jeesite.modules: debug
# MyBatis 相关
mybatis:
# Mapper文件刷新线程
mapper:
refresh:
enabled: true
#======================================#
#========== System settings ===========#
#======================================#
# 管理基础路径
adminPath: /a
# 前端基础路径
frontPath: /f
# Vue 资源文件访问路径,映射到 src/main/resources/{vuePath} 文件夹
# 如果设置的是 /vue则映射目录为src/main/resources/vue 文件夹
# 该资源映射功能,会自动处理 Vue 的 history 路由模式
vuePath: /vue
# 用户相关
user:
# 多租户模式SAAS模式专业版
useCorpModel: false
# 国际化管理(专业版)
lang:
enabled: false
# 任务调度(标准版)
job:
enabled: false
# 代码生成
gen:
enabled: true
# 系统监控
state:
enabled: true
#======================================#
#========= Framework settings =========#
#======================================#
# Shiro 相关
shiro:
# defaultPath: ${shiro.loginUrl}
defaultPath: ${vuePath}/login
# 登录相关设置
loginUrl: ${adminPath}/login
logoutUrl: ${shiro.loginUrl}
successUrl: ${adminPath}/index
# 简单 SSO 登录相关配置
sso:
# 如果启用/sso/{username}/{token}单点登录请修改此安全key并与单点登录系统key一致。
secretKey: ~
# 是否加密单点登录安全Key
encryptKey: true
# token 时效性1天yyyyMMdd、1小时yyyyMMddHH、1分钟yyyyMMddHHmm
encryptKeyDateFormat: yyyyMMdd
# 登录提交信息加密(如果不需要加密,设置为空即可)
loginSubmit:
# 加密用户名、密码、验证码后再提交key设置为3个用逗号分隔加密方式DES4.1.9及之前版本默认设置)
# v4.2.0+ 开始支持 Base64 加密方式,方便移动端及第三方系统处理认证,可直接设置 Key 为 Base644.2.0+默认设置)
#secretKey: thinkgem,jeesite,com
secretKey: Base64
#secretKey: ~
# 记住我密钥设置,你可以通过 com.jeesite.test.RememberMeKeyGen 类快速生成一个秘钥。
# 若不设置,则每次启动系统后自动生成一个新秘钥,这样会导致每次重启后,客户端记录的用户信息将失效。
rememberMe:
secretKey: ~
# 是否允许跨域访问 CORS如果允许设置允许的域名。v4.2.3 开始支持多个域名和模糊匹配例如http://*.jeesite.com,http://*.jeesite.net
accessControlAllowOrigin: '*'
# 允许跨域访问时 CORS可以获取和返回的方法和请求头
accessControlAllowMethods: GET, POST, OPTIONS
accessControlAllowHeaders: content-type, x-requested-with, x-ajax, x-token, x-remember
accessControlExposeHeaders: x-token, x-remember
# Session 相关
session:
# 会话唯一标识SessionId在Cookie中的名称。
sessionIdCookieName: ai.jeesite.session.id
sessionIdCookiePath: ${server.servlet.context-path}
# Web 相关
web:
# 核心模块的Web功能开启其它微服务时设为false
core:
enabled: true
# 在线API文档
springdoc:
api-docs:
enabled: true
swagger-ui:
enabled: true
# 错误页面500.html是否输出错误信息正式环境为提供安全性可设置为false
error:
page:
printErrorInfo: true
#======================================#
#======== FileUpload settings =========#
#======================================#
# 文件上传
file:
enabled: true
#======================================#
#========== Message settings ==========#
#======================================#
# 消息提醒中心(专业版)
msg:
enabled: true
#======================================#
#========== Project settings ==========#
#======================================#

View File

@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false" scan="false">
<!-- Log file path -->
<property name="log.path" value="${logPath:-${java.io.tmpdir:-.}}/logs" />
<!-- Framework level setting -->
<include resource="config/logger-core.xml" />
<!-- Production level setting -->
<logger name="org.mybatis.spring.transaction" level="INFO" />
<logger name="org.flowable.ui.modeler.domain" level="INFO" />
<logger name="org.flowable.idm.engine.impl.persistence" level="INFO" />
<logger name="org.flowable.task.service.impl.persistence" level="INFO" />
<logger name="org.flowable.identitylink.service.impl.persistence" level="INFO" />
<logger name="org.flowable.variable.service.impl.persistence" level="INFO" />
<logger name="org.flowable.engine.impl.persistence" level="INFO" />
<logger name="com.bstek.ureport" level="INFO" />
<logger name="com.jeesite.modules" level="INFO" />
<!-- Project level setting -->
<!-- <logger name="your.package" level="DEBUG" /> -->
<!-- Console log output -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{MM-dd HH:mm:ss.SSS} %clr(%-5p) %clr([%-39logger{39}]){cyan} - %m%n%wEx</pattern>
</encoder>
</appender>
<!-- Log file debug output -->
<appender name="debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/debug.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${log.path}/debug.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p ${PID:- } [%15.15t] [%-39logger{39}] [%X{TRACE_ID}] - %m%n%wEx</pattern>
</encoder>
<!--<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>ERROR</level>
<onMatch>DENY</onMatch>
<onMismatch>NEUTRAL</onMismatch>
</filter>-->
</appender>
<!-- Log file error output -->
<appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/error.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p ${PID:- } [%15.15t] [%-39logger{39}] [%X{TRACE_ID}] - %m%n%wEx</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
</appender>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root level="WARN">
<appender-ref ref="console" />
<appender-ref ref="debug" />
<appender-ref ref="error" />
</root>
</configuration>

View File

@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false" scan="false">
<!-- Log file path -->
<property name="log.path" value="${logPath:-${java.io.tmpdir:-.}}/logs" />
<!-- Framework level setting -->
<include resource="config/logger-core.xml" />
<!-- Project level setting -->
<!-- <logger name="your.package" level="DEBUG" /> -->
<!-- <logger name="org.springframework.ai" level="TRACE" />-->
<!-- <logger name="com.jeesite.modules.ai.cms.config.WebClientThinkConfig" level="TRACE" />-->
<!-- Console log output -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{MM-dd HH:mm:ss.SSS} %clr(%-5p) %clr([%-39logger{39}]){cyan} - %m%n%wEx</pattern>
</encoder>
</appender>
<!-- Log file debug output -->
<appender name="debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/debug.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${log.path}/debug.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p ${PID:- } [%15.15t] [%-39logger{39}] [%X{TRACE_ID}] - %m%n%wEx</pattern>
</encoder>
<!--<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>ERROR</level>
<onMatch>DENY</onMatch>
<onMismatch>NEUTRAL</onMismatch>
</filter>-->
</appender>
<!-- Log file error output -->
<appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/error.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p ${PID:- } [%15.15t] [%-39logger{39}] [%X{TRACE_ID}] - %m%n%wEx</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
</appender>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root level="WARN">
<appender-ref ref="console" />
<appender-ref ref="debug" />
<appender-ref ref="error" />
</root>
</configuration>

View File

@@ -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里的样式
*/

View File

@@ -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里的方法
*/

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -0,0 +1,2 @@
window.__PRODUCTION__JEESITE__CONF__={"VITE_GLOB_APP_TITLE":"JeeSite 快速开发平台","VITE_GLOB_APP_SHORT_NAME":"jeesite","VITE_GLOB_API_URL":"",
"VITE_GLOB_API_URL_PREFIX":"/js","VITE_GLOB_ADMIN_PATH":"/a","VITE_FILE_PREVIEW":"true"};Object.freeze(window.__PRODUCTION__JEESITE__CONF__);Object.defineProperty(window,"__PRODUCTION__JEESITE__CONF__",{configurable:false,writable:false,});var _hmt =_hmt ||[];(function(){var hm =document.createElement("script");hm.src ="https://hm.baidu.com/hm.js?65b88e88a94e0118de2962f328f17622";var s =document.getElementsByTagName("script")[0];s.parentNode.insertBefore(hm,s);})();

View File

@@ -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 [<5B><>Ϣ] <20><><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̡<EFBFBD>
echo.
rem pause
rem echo.
%~d0
cd %~dp0
title %cd%
rem <20><><EFBFBD><EFBFBD>JDKĿ¼
rem set "JAVA_HOME=%cd%\jdk1.8.0_x64"
rem <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7>
set "CLASS_PATH=%cd%/../"
rem <20>Ż<EFBFBD>JVM<56><4D><EFBFBD><EFBFBD>
set "JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx1024m"
rem <20><>ʽһ<CABD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ<EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
rem set "JAVA_OPTS=%JAVA_OPTS% -Dspring.config.location=%cd%\app.yml"
rem <20><>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD><EFBFBD>ز<EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
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.launch.WarLauncher %*
goto end
:end
pause

View File

@@ -0,0 +1,35 @@
#!/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 ""
cd "$(cd "$(dirname "$0")"; pwd)"
# 设置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.launch.WarLauncher $@

View File

@@ -0,0 +1,32 @@
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
*/
package com.jeesite.test;
import org.junit.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import com.jeesite.common.tests.BaseInitDataTests;
import com.jeesite.modules.AiCmsApplication;
/**
* 初始化数据表
* @author ThinkGem
*/
@ActiveProfiles("test")
@SpringBootTest(classes = AiCmsApplication.class)
public class InitData extends BaseInitDataTests {
@Test
public void initData01() throws Exception{
logger.info("数据库初始化完成。");
}
@Override
public void initProperty() {
System.setProperty("jeesite.initdata", "true");
}
}

View File

@@ -0,0 +1,26 @@
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
*/
package com.jeesite.test;
import org.apache.shiro.crypto.cipher.AesCipherService;
import org.apache.shiro.lang.codec.Base64;
/**
* v4.1.8 开始将不为记住我功能,设置默认密钥,即启动系统时生成新密钥。
* 这样会造成一个问题,比如:重启服务后,记住登录的用户因为解密失败,而需要重新登录。
* 为了解决这个问题,您可以通过这个类获取一个新密钥,设置到 shiro.rememberMe.secretKey 中即可。
* 另外,如果你从配置文件里将 shiro.rememberMe.secretKey 设置为空,启动系统时也会自动设置一个新的密钥。
* @author ThinkGem
* @version 2019年11月6日
*/
public class RememberMeKeyGen {
public static void main(String[] args) {
byte[] cipherKey = new AesCipherService().generateNewKey().getEncoded();
String secretKey = Base64.encodeToString(cipherKey);
System.out.println("shiro.rememberMe.secretKey = " + secretKey);
}
}