健壮性增强

This commit is contained in:
thinkgem
2025-04-21 13:40:20 +08:00
parent 5ad7114d89
commit ea1744afda
3 changed files with 30 additions and 27 deletions

View File

@@ -42,9 +42,9 @@ public class FastApplication extends SpringBootServletInitializer {
if (StringUtils.isNoneBlank(vuePath, ctxPath)) {
logger.info(
"\r\n\r\n==============================================================\r\n"
+ "\r\n 存在此提示:因为您修改了 server.servlet.context-path 参数,需要您"
+ "\r\n 同步修改 jeesite-vue/.env.tomcat 中的 VITE_PUBLIC_PATH 并重新打包 "
+ "\r\n context-path: " + ctxPath +" 即对应为 VITE_PUBLIC_PATH = " + ctxPath + vuePath
+ "\r\n 提示:您修改了 server.servlet.context-path 参数,需要您"
+ "\r\n 同步修改 _app.config.js 中的 VITE_GLOB_API_URL_PREFIX 参数 "
+ "\r\n 请修改为 VITE_GLOB_API_URL_PREFIX=\"" + ctxPath + "\""
+ "\r\n\r\n==============================================================\r\n");
}
logger.info(

View File

@@ -27,6 +27,7 @@ server:
servlet:
context-path: ~
register-default-servlet: false
# encoding.enabled: true
tomcat:
uri-encoding: UTF-8
# 表单请求数据的最大大小
@@ -38,11 +39,11 @@ server:
# # 线程数最大和最小个数
# threads:
# max: 200
# min-spare: 10
# min-spare: 10
# 当 Nginx 为 httpstomcat 为 http 时,设置该选项为 true
schemeHttps: false
#======================================#
#========== Database sttings ==========#
#======================================#
@@ -60,7 +61,7 @@ jdbc:
# 连接信息加密
encrypt:
# 加密连接用户名
username: false
# 加密连接密码
@@ -68,7 +69,7 @@ jdbc:
# 数据库连接池配置
pool:
# 初始化连接数
init: 1
# 最小空闲连接数
@@ -81,15 +82,15 @@ jdbc:
#======================================#
spring:
# 应用程序名称
application:
name: jeesite-web-h2db
# 环境名称(注意:不可设置为 test 它是单元测试专用的名称)
profiles:
active: default
# 打印横幅
main:
bannerMode: "off"
@@ -98,7 +99,7 @@ spring:
mvc:
pathmatch:
matching-strategy: ANT_PATH_MATCHER
# 日志配置fatal、error、warn、info、debug
logging:
config: classpath:config/logback-spring.xml
@@ -113,7 +114,7 @@ mybatis:
mapper:
refresh:
enabled: true
#======================================#
#========== System settings ===========#
#======================================#
@@ -130,14 +131,14 @@ vuePath: /vue
# 用户相关
user:
# 多租户模式SAAS模式专业版
useCorpModel: false
# 国际化管理(专业版)
lang:
enabled: true
# 任务调度(标准版)
job:
enabled: true
@@ -145,7 +146,7 @@ job:
# 代码生成
gen:
enabled: true
# 系统监控
state:
enabled: true
@@ -156,7 +157,7 @@ state:
# Shiro 相关
shiro:
# defaultPath: ${shiro.loginUrl}
defaultPath: ${vuePath}/login
@@ -181,15 +182,15 @@ shiro:
#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
@@ -200,16 +201,16 @@ session:
# 会话唯一标识SessionId在Cookie中的名称。
sessionIdCookieName: h2db.jeesite.session.id
sessionIdCookiePath: ${server.servlet.context-path}
# Web 相关
web:
# 核心模块的Web功能开启其它微服务时设为false
core:
core:
enabled: true
# 在线API文档工具
swagger:
swagger:
enabled: true
# 错误页面500.html是否输出错误信息正式环境为提供安全性可设置为false
@@ -224,7 +225,7 @@ error:
# 文件上传
file:
enabled: true
#======================================#
#========== Message settings ==========#
#======================================#
@@ -232,7 +233,7 @@ file:
# 消息提醒中心(专业版)
msg:
enabled: true
#======================================#
#========== Project settings ==========#
#======================================#

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":"","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);})();