Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b36bdbdd48 | ||
|
|
02d0992694 | ||
|
|
75b66fbc29 | ||
|
|
51ea1cebb3 | ||
|
|
f7fc2ff8ad | ||
|
|
f8f8469c3a | ||
|
|
50136e09a2 | ||
|
|
66d7ec04dc | ||
|
|
e714923b47 | ||
|
|
456eb9644b | ||
|
|
46e0ee7717 | ||
|
|
67041873fc | ||
|
|
2d298a6fc7 | ||
|
|
d3de1eb957 | ||
|
|
5c09f28266 | ||
|
|
15947015f8 | ||
|
|
d46ee0c359 | ||
|
|
11c8c3e0f7 | ||
|
|
afdbef4f26 | ||
|
|
541656c60a | ||
|
|
68cfc664ec | ||
|
|
ad423b4b9b | ||
|
|
4c9ca4d932 |
68
README.md
68
README.md
@@ -10,53 +10,65 @@
|
||||
<a href="https://gitee.com/thinkgem/jeesite5/members" target="__blank"><img alt="fork" src="https://gitee.com/thinkgem/jeesite5/badge/fork.svg?theme=dark"></a>
|
||||
</p>
|
||||
|
||||
------
|
||||
|
||||
<div align="center">
|
||||
如果你喜欢 JeeSite,请给她一个 ⭐️ Star,您的支持将是我们前行的动力。
|
||||
</div>
|
||||
|
||||
------
|
||||
|
||||
## 技术交流
|
||||
|
||||
* 交流 QQ 群(千人大群):`127515876`、`209330483`、`223507718`、`709534275`、`730390092`、`1373527`、`183903863(外包)`
|
||||
* 码云Gitee:<https://gitee.com/thinkgem/jeesite5>
|
||||
* GitHub:<https://github.com/thinkgem/jeesite5>
|
||||
* 作者博客:<https://my.oschina.net/thinkgem>
|
||||
* **帮助文档:**<http://docs.jeesite.com>
|
||||
* 官方网站:<http://jeesite.com>
|
||||
* 官方网站:<https://jeesite.com>
|
||||
* 使用文档:<https://jeesite.com/docs>
|
||||
* 问题反馈:<http://jeesite.net> [【新手必读】](https://gitee.com/thinkgem/jeesite5/issues/I18ARR)
|
||||
* 需求收集:<https://gitee.com/thinkgem/jeesite5/issues/new>
|
||||
* QQ 群:`127515876`、`209330483`、`223507718`、`709534275`、`730390092`、`1373527`、`183903863(外包)`
|
||||
* 关注微信公众号,了解最新动态:
|
||||
|
||||

|
||||
<p style="padding-left:40px">
|
||||
<img alt="JeeSite微信公众号" src="https://images.gitee.com/uploads/images/2020/0727/091951_a3ab258c_6732.jpeg" width="220" height="220">
|
||||
</p>
|
||||
|
||||
* 源码仓库地址:<https://gitee.com/thinkgem/jeesite5>
|
||||
* 分离版前端源码仓库:<https://gitee.com/thinkgem/jeesite-vue>
|
||||
* 源码仓库地址1:<https://gitee.com/thinkgem/jeesite5>
|
||||
* 源码仓库地址2:<https://github.com/thinkgem/jeesite5>
|
||||
* 分离版前端源码仓库地址1:<https://gitee.com/thinkgem/jeesite-vue>
|
||||
* 分离版前端源码仓库地址2:<https://github.com/thinkgem/jeesite-vue>
|
||||
|
||||
## 平台介绍
|
||||
|
||||
JeeSite 快速开发平台,不仅仅是一个后台开发框架,它是一个企业级快速开发解决方案,后端基于经典组合 Spring Boot、Shiro、MyBatis,前端采用 Beetl、Bootstrap、AdminLTE 经典开发模式,或者分离版 Vue3、Vite、Ant Design Vue、TypeScript、Vben Admin 最先进技术栈。
|
||||
* JeeSite 快速开发平台,不仅仅是一个后台开发框架,它是一个企业级快速开发解决方案,后端基于经典组合 Spring Boot、Shiro、MyBatis,前端采用 Beetl、Bootstrap、AdminLTE 经典开发模式,或者分离版 Vue3、Vite、Ant Design Vue、TypeScript、Vben Admin 最先进技术栈。
|
||||
|
||||
提供在线代码生成功能,可自动创建业务模块工程和微服务模块工程,自动生成前端代码和后端代码;包括功能模块如:组织机构、角色用户、菜单及按钮授权、数据权限、系统参数、内容管理、工作流等。
|
||||
* 提供在线数据源管理、数据表建模、代码生成等功能,可自动创建业务模块代码工程和微服务模块代码工程,自动生成前端代码和后端代码;包括核心功能模块如:组织机构、用户、角色、岗位、管理员、权限审计、菜单及按钮权限、数据权限、模块管理、系统参数、字典管理、系统监控、数据监控等;扩展功能如:工作流引擎、内容管理、消息推送、单点登录、第三方登录、在线作业调度、对象存储、可视化数据大屏、报表设计器、在线文件预览、国际化、全文检索、统一认证服务等。
|
||||
|
||||
采用松耦合设计,微内核和插件架构,模块增减便捷;界面细节到位,一键换肤;众多账号安全设置,密码策略;文件在线预览;消息推送;多元化第三方登录;在线定时任务配置;支持集群,支持SAAS;支持多数据源;支持读写分离、分库分表;支持微服务应用。
|
||||
* 本平台采用松耦合设计,微内核和插件架构,模块增减便捷,支持集群,支持 SaaS 架构,支持读写分离、分库分表、Spring Cloud 微服务架构;并内置了众多账号安全设置、密码策略、系统访问限制等安全解决方案,支持等保评测。
|
||||
|
||||
主要目的是能够让初级的研发人员快速的开发出复杂的业务功能,中高级人员有时间做一些更有用的事情。让开发者注重专注业务,其余有平台来封装技术细节,降低技术难度,从而节省人力成本,缩短项目周期,提高软件安全质量。
|
||||
* 本平台专注于为初级研发人员提供强大的支持,使他们能够高效、快速地开发出复杂的业务功能,同时为中高级人员腾出宝贵的时间,专注于更具战略性和创新性的任务。我们致力于让开发者能够全心投入业务逻辑中,而将繁琐的技术细节交由平台来封装处理。这不仅降低了技术实现的难度,还确保了系统架构的稳定性和安全性,进而帮助企业节省人力成本、缩短项目周期,并提高整体软件的安全性和质量。
|
||||
|
||||
JeeSite 自 2013 年发布以来已被广大爱好者用到了企业、政府、医疗、金融、互联网等各个领域中,拥有:精良架构、易于扩展、大众思维的设计模式,工匠精神,用心打磨每一个细节,深入开发者的内心,并荣获开源中国《最受欢迎中国开源软件》多次奖项,期间也帮助了不少刚毕业的大学生,教师作为入门教材,快速的去实践。
|
||||
* 2013 年发布以来已被广大爱好者用到了企业、政府、医疗、金融、互联网等各个领域中,拥有:精良架构、易于扩展、大众思维的设计模式,工匠精神,用心打磨每一个细节,深入开发者的内心,并荣获开源中国《最受欢迎中国开源软件》多次奖项,期间也帮助了不少刚毕业的大学生,教师作为入门教材,快速的去实践。
|
||||
|
||||
2019 年换代升级,作者结合了多年总结和经验,以及各方面的应用案例,对架构完成了一次全部重构,也纳入很多新的思想。不管是从开发者模式、底层架构、逻辑处理还是到用户界面,用户交互体验上都有很大的进步,在不忘学习成本、提高开发效率的情况下,安全方面也做和很多工作,包括:身份认证、密码策略、安全审计、日志收集等众多安全选项供您选择。努力为大中小微企业打造全方位企业级快速开发解决方案。
|
||||
* 2019 年换代升级,我们结合了多年总结和经验,以及各方面的应用案例,对架构完成了一次全部重构,也纳入很多新的思想。不管是从开发者模式、底层架构、逻辑处理还是到用户界面,用户交互体验上都有很大的进步,在不忘学习成本、提高开发效率的情况下,安全方面也做和很多工作,包括:身份认证、密码策略、安全审计、日志收集等众多安全选项供您选择。努力为大中小微企业打造全方位企业级快速开发解决方案。
|
||||
|
||||
2021 年终发布 Vue3 的前后分离版本,使得 JeeSite 拥有同一个后台服务 Web 来支撑分离版和全栈版两套前端技术栈。
|
||||
* 2021 年终发布 Vue3 的前后分离版本,使得 JeeSite 拥有同一个后台服务 Web 来支撑分离版和全栈版两套前端技术栈。
|
||||
|
||||
## 平台优势
|
||||
## 核心优势
|
||||
|
||||
JeeSite 非常易于二次开发,可控性高,整体架构清晰、技术稳定而先进、源代码书写规范、经典技术会的人多、易于维护、易于扩展、安全稳定。
|
||||
* JeeSite 非常易于二次开发,可控性高,整体架构清晰、技术稳定而先进、源代码书写规范、经典技术会的人多、易于维护、易于扩展、安全稳定。
|
||||
|
||||
JeeSite 功能全,知识点非常多,也非常少。因为她使用的都是一些通用的技术,通俗的设计风格,大多数基础知识点,多数人都能掌握,所以每一个 JeeSite 的功能点都非常容易掌握。只要您学会使用这些功能和组件的应用,就可以顺利的完成系统开发了。
|
||||
* JeeSite 功能全,知识点非常多,也非常少。因为她使用的都是一些通用的技术,通俗的设计风格,大多数基础知识点,多数人都能掌握,所以每一个 JeeSite 的功能点都非常容易掌握。只要您学会使用这些功能和组件的应用,就可以顺利的完成系统开发了。
|
||||
|
||||
JeeSite 是一个低代码开发平台,具有较高的封装度、扩展性,封装不是限制您去做一些事情,而是在便捷的同时,也具有较好的扩展性,在不具备一些功能的情况下,JeeSite 提供了扩展接口,提供了原生调用方法。
|
||||
* JeeSite 是一个低代码开发平台,具有较高的封装度、扩展性,封装不是限制您去做一些事情,而是在便捷的同时,也具有较好的扩展性,在不具备一些功能的情况下,JeeSite 提供了扩展接口,提供了原生调用方法。
|
||||
|
||||
大家都在用 Spring,也在学习 Spring 的优点,Spring 提供了较好的扩展性,可又有多少人去修改它的源代码呢,退一步说,大家去修改了 Spring 的源码,反而会对未来升级造成很大困扰,您说不是呢?这样的例子很多,所以不要纠结,我们非常注重这一点,JeeSite 也一样具备强大的扩展性。
|
||||
* 大家都在用 Spring,也在学习 Spring 的优点,Spring 提供了较好的扩展性,可又有多少人去修改它的源代码呢,退一步说,大家去修改了 Spring 的源码,反而会对未来升级造成很大困扰,您说不是呢?这样的例子很多,所以不要纠结,我们非常注重这一点,JeeSite 也一样具备强大的扩展性。为你解决升级的困扰。
|
||||
|
||||
为什么说 JeeSite 比较易于学习?JeeSite 很好的把握了设计的 “度”,避免过度设计的情况。过度设计是在产品设计过程中忽略了产品和用户的实际需求,反而带来了不必要的复杂性,而忽略了系统的学习、开发和维护成本。
|
||||
* 为什么说 JeeSite 比较易于学习?JeeSite 很好的把握了设计的 “度”,避免过度设计的情况。过度设计是在产品设计过程中忽略了产品和用户的实际需求,反而带来了不必要的复杂性,而忽略了系统的学习、开发和维护成本。
|
||||
|
||||
* 至今 JeeSite 平台架构已经非常稳定。
|
||||
* JeeSite 精益求精,用心打磨每一个细节。
|
||||
* JeeSite 是一个专业的平台,是一个让你使用放心的平台。
|
||||
------
|
||||
|
||||
* 至今 JeeSite 平台架构已经非常稳定,我们持续升级,并不失架构的先进性。
|
||||
* JeeSite 精益求精,用心打磨每一个细节,界面 UI 操作便捷,体验性好。
|
||||
* JeeSite 是一个专业的平台,是一个可以让您使用放心的平台。
|
||||
* 社区版基于 Apache License 2.0 开源协议,永久免费使用。
|
||||
|
||||
### 架构特点及安全方面的优势:<https://jeesite.com/docs/feature/>
|
||||
@@ -87,13 +99,13 @@ JeeSite 是一个低代码开发平台,具有较高的封装度、扩展性,
|
||||
|
||||
* 分布式微服务(Spring Cloud):<https://gitee.com/thinkgem/jeesite-cloud>
|
||||
* Flowable业务流程引擎(BPM):<http://jeesite.com/docs/bpm/>
|
||||
* JFlow工作流引擎:<https://gitee.com/thinkgem/jeesite-jflow>
|
||||
* 多站点内容管理模块(CMS):<https://jeesite.com/docs/cms/>
|
||||
* 手机端移动端:<https://gitee.com/thinkgem/jeesite-uniapp>
|
||||
* PC客户端程序:<https://gitee.com/thinkgem/jeesite-client>
|
||||
* Vue3分离版本:<https://gitee.com/thinkgem/jeesite-vue>
|
||||
* JeeSite统一认证:<https://jeesite.com/docs/oauth2-server>
|
||||
* MybatisPlus: <https://gitee.com/thinkgem/jeesite-mybatisplus>
|
||||
* JFlow工作流引擎:<https://gitee.com/thinkgem/jeesite-jflow>
|
||||
* Mybatis-Plus: <https://gitee.com/thinkgem/jeesite-mybatisplus>
|
||||
* Magic接口快速开发:<https://gitee.com/thinkgem/jeesite-magic-api>
|
||||
* 内外网中间件:<https://my.oschina.net/thinkgem/blog/4624519>
|
||||
|
||||
@@ -101,7 +113,7 @@ JeeSite 是一个低代码开发平台,具有较高的封装度、扩展性,
|
||||
|
||||
### 在线演示
|
||||
|
||||
1. 全栈版地址:<http://vue.jeesite.com/js>
|
||||
1. 全栈版地址:<http://demo.jeesite.com>
|
||||
2. Vue3分离版地址:<http://vue.jeesite.com>
|
||||
|
||||
### 本地运行
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>5.7.1-SNAPSHOT</version>
|
||||
<version>5.8.0-SNAPSHOT</version>
|
||||
<relativePath>../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -710,11 +710,11 @@ public class FileUtils extends org.apache.commons.io.FileUtils {
|
||||
end = Long.parseLong(values[1]);
|
||||
}
|
||||
}
|
||||
int requestSize = 0;
|
||||
long requestSize = 0;
|
||||
if (end != 0 && end > start) {
|
||||
requestSize = Long.valueOf(end - start + 1).intValue();
|
||||
} else {
|
||||
requestSize = Integer.MAX_VALUE;
|
||||
requestSize = Long.MAX_VALUE;
|
||||
}
|
||||
response.setContentType(FileUtils.getContentType(file.getName()));
|
||||
boolean isPreview = "preview".equalsIgnoreCase(request.getParameter("source"));
|
||||
@@ -748,12 +748,12 @@ public class FileUtils extends org.apache.commons.io.FileUtils {
|
||||
}
|
||||
}
|
||||
randomFile.seek(start);
|
||||
int needSize = requestSize;
|
||||
long needSize = requestSize;
|
||||
while (needSize > 0) {
|
||||
byte[] buffer = new byte[1024];
|
||||
int len = randomFile.read(buffer);
|
||||
if (needSize < buffer.length) {
|
||||
out.write(buffer, 0, needSize);
|
||||
out.write(buffer, 0, (int)needSize);
|
||||
} else {
|
||||
out.write(buffer, 0, len);
|
||||
if (len < buffer.length) {
|
||||
|
||||
@@ -47,6 +47,9 @@ public abstract class MethodAccess {
|
||||
|
||||
/** Returns the index of the first method with the specified name. */
|
||||
public int getIndex (String methodName) {
|
||||
// 先查找无参数的方法,再查找有参数的方法,当未传递参数类型的时候,这是一个降级策略
|
||||
for (int i = 0, n = methodNames.length; i < n; i++)
|
||||
if (methodNames[i].equals(methodName) && parameterTypes[i].length == 0) return i;
|
||||
for (int i = 0, n = methodNames.length; i < n; i++)
|
||||
if (methodNames[i].equals(methodName)) return i;
|
||||
throw new IllegalArgumentException("Unable to find non-private method: " + methodName);
|
||||
|
||||
@@ -7,7 +7,6 @@ package com.jeesite.common.web;
|
||||
import com.jeesite.common.codec.EncodeUtils;
|
||||
import com.jeesite.common.io.PropertiesUtils;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -96,7 +95,8 @@ public class CookieUtils {
|
||||
* @return 值
|
||||
*/
|
||||
public static String getCookie(HttpServletRequest request, HttpServletResponse response, String name, boolean isRemove) {
|
||||
return getCookie(request, response, name, request != null ? request.getContextPath() : "", false);
|
||||
String ctxPath = PropertiesUtils.getInstance().getProperty("ctxPath", request != null ? request.getContextPath() : StringUtils.EMPTY);
|
||||
return getCookie(request, response, name, ctxPath, isRemove);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -116,6 +116,7 @@ public class CookieUtils {
|
||||
for (Cookie cookie : cookies) {
|
||||
if (cookie.getName().equals(name)) {
|
||||
value = EncodeUtils.decodeUrl(cookie.getValue());
|
||||
value = EncodeUtils.xssFilter(value, request);
|
||||
if (isRemove && response != null) {
|
||||
cookie.setPath(path);
|
||||
cookie.setMaxAge(0);
|
||||
|
||||
@@ -12,14 +12,14 @@ import com.jeesite.common.lang.ExceptionUtils;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.mapper.JsonMapper;
|
||||
import com.jeesite.common.mapper.XmlMapper;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
@@ -56,7 +56,7 @@ public class ServletUtils {
|
||||
|
||||
// 是否打印错误信息参数到视图页面(生产环境关闭)
|
||||
private static final Boolean PRINT_ERROR_INFO = PROPS.getPropertyToBoolean("error.page.printErrorInfo", "true");
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前请求对象
|
||||
* web.xml: <listener><listener-class>
|
||||
@@ -106,7 +106,8 @@ public class ServletUtils {
|
||||
if (StringUtils.contains(url, "://")){
|
||||
response.sendRedirect(url);
|
||||
}else{
|
||||
response.sendRedirect(request.getContextPath() + url);
|
||||
String ctxPath = PropertiesUtils.getInstance().getProperty("ctxPath", request.getContextPath());
|
||||
response.sendRedirect(ctxPath + url);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>5.7.1-SNAPSHOT</version>
|
||||
<version>5.8.0-SNAPSHOT</version>
|
||||
<relativePath>../../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -17,4 +17,5 @@
|
||||
5.6.0
|
||||
5.6.1
|
||||
5.7.0
|
||||
5.7.1
|
||||
5.7.1
|
||||
5.8.0
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>5.7.1-SNAPSHOT</version>
|
||||
<version>5.8.0-SNAPSHOT</version>
|
||||
<relativePath>../../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ public class ArticleService extends CrudService<ArticleDao, Article> {
|
||||
@Autowired(required = false)
|
||||
private PageCacheService pageCacheService;
|
||||
|
||||
private static ExecutorService updateExpiredWeightThreadPool = new ThreadPoolExecutor(5, 20,
|
||||
private static final ExecutorService updateExpiredWeightThreadPool = new ThreadPoolExecutor(5, 20,
|
||||
60L, TimeUnit.SECONDS, new LinkedBlockingQueue<>(),
|
||||
new DefaultThreadFactory("cms-update-expired-weight"));
|
||||
|
||||
@@ -240,7 +240,8 @@ public class ArticleService extends CrudService<ArticleDao, Article> {
|
||||
public Page<Map<String, Object>> searchPage(Page<Map<String, Object>> page, String qStr,
|
||||
String qand, String qnot, String bd, String ed, Map<String, String> params) {
|
||||
if (articleIndexService == null) {
|
||||
page.addOtherData("message", text("您好,系统未安装全文检索模块。"));
|
||||
page.addOtherData("message", text("您好,请安装全文检索模块后再试。" +
|
||||
"<a href=\"https://jeesite.com/docs/cms/\" target=\"_blank\">安装文档</a>"));
|
||||
return page;
|
||||
}
|
||||
return articleIndexService.searchPage(page, qStr, qand, qnot, bd, ed, params);
|
||||
|
||||
@@ -38,7 +38,6 @@ public class CmsUtils {
|
||||
private static final SiteService siteService = SpringUtils.getBean(SiteService.class);
|
||||
private static final CategoryService categoryService = SpringUtils.getBean(CategoryService.class);
|
||||
private static final ArticleService articleService = SpringUtils.getBean(ArticleService.class);
|
||||
private static final ServletContext context = SpringUtils.getBean(ServletContext.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -243,7 +242,7 @@ public class CmsUtils {
|
||||
*/
|
||||
public static String getUrlDynamic(Article article) {
|
||||
StringBuilder str = new StringBuilder();
|
||||
str.append(Static.context.getContextPath());
|
||||
str.append(Global.getCtxPath());
|
||||
if (StringUtils.isNotBlank(article.getHref())) {
|
||||
if (article.getHref().contains("://")) {
|
||||
return article.getHref();
|
||||
@@ -265,7 +264,7 @@ public class CmsUtils {
|
||||
*/
|
||||
public static String getUrlDynamic(Category category) {
|
||||
StringBuilder str = new StringBuilder();
|
||||
str.append(Static.context.getContextPath()).append(Global.getFrontPath());
|
||||
str.append(Global.getCtxPath()).append(Global.getFrontPath());
|
||||
if (StringUtils.isNotBlank(category.getHref())) {
|
||||
if (category.getHref().contains("://")) {
|
||||
return category.getHref();
|
||||
@@ -285,7 +284,7 @@ public class CmsUtils {
|
||||
*/
|
||||
public static String getUrlDynamic(Site site) {
|
||||
StringBuilder str = new StringBuilder();
|
||||
str.append(Static.context.getContextPath()).append(Global.getFrontPath());
|
||||
str.append(Global.getCtxPath()).append(Global.getFrontPath());
|
||||
if (StringUtils.isNotBlank(site.getDomain())) {
|
||||
if (site.getDomain().contains("://")) {
|
||||
return site.getDomain();
|
||||
@@ -305,7 +304,7 @@ public class CmsUtils {
|
||||
*/
|
||||
public static String getAdminUrlDynamic(Category category) {
|
||||
StringBuilder str = new StringBuilder();
|
||||
str.append(Static.context.getContextPath()).append(Global.getAdminPath());
|
||||
str.append(Global.getCtxPath()).append(Global.getAdminPath());
|
||||
String adminUrlParam = null; // 管理地址的参数
|
||||
// 如果试图配置里配置了管理路径,则使用视图中的管理路径
|
||||
if (StringUtils.isNotBlank(category.getViewConfig())) {
|
||||
@@ -389,8 +388,8 @@ public class CmsUtils {
|
||||
if (StringUtils.isBlank(src)) {
|
||||
return src;
|
||||
}
|
||||
if (src.startsWith(Static.context.getContextPath() + "/userfiles")) {
|
||||
return src.substring(Static.context.getContextPath().length());
|
||||
if (src.startsWith(Global.getCtxPath() + "/userfiles")) {
|
||||
return src.substring(Global.getCtxPath().length());
|
||||
} else {
|
||||
return src;
|
||||
}
|
||||
@@ -405,10 +404,10 @@ public class CmsUtils {
|
||||
if (StringUtils.isBlank(src)) {
|
||||
return src;
|
||||
}
|
||||
if (src.startsWith(Static.context.getContextPath() + "/userfiles")) {
|
||||
if (src.startsWith(Global.getCtxPath() + "/userfiles")) {
|
||||
return src;
|
||||
} else {
|
||||
return Static.context.getContextPath() + src;
|
||||
return Global.getCtxPath() + src;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -494,10 +493,6 @@ public class CmsUtils {
|
||||
return Static.articleService;
|
||||
}
|
||||
|
||||
public static ServletContext getServletContext() {
|
||||
return Static.context;
|
||||
}
|
||||
|
||||
public static <V> V getCache(String key) {
|
||||
return CacheUtils.get(CMS_CACHE, key);
|
||||
}
|
||||
|
||||
@@ -105,10 +105,11 @@ public class FrontController extends BaseController {
|
||||
|
||||
// 如果设置了外部链接,则跳转到指定链接
|
||||
if (StringUtils.isNotBlank(category.getHref())) {
|
||||
if (category.getHref().startsWith(request.getContextPath())) {
|
||||
category.setHref(category.getHref().replaceFirst(request.getContextPath(), ""));
|
||||
String ctxPath = Global.getCtxPath();
|
||||
if (category.getHref().startsWith(ctxPath)) {
|
||||
category.setHref(category.getHref().replaceFirst(ctxPath, StringUtils.EMPTY));
|
||||
}
|
||||
return "redirect:" + category.getHref();
|
||||
return REDIRECT + category.getHref();
|
||||
}
|
||||
|
||||
// 获取站点信息
|
||||
@@ -266,10 +267,11 @@ public class FrontController extends BaseController {
|
||||
|
||||
// 如果设置了外部链接,则跳转到指定链接
|
||||
if (StringUtils.isNotBlank(article.getHref())) {
|
||||
if (article.getHref().startsWith(request.getContextPath())) {
|
||||
article.setHref(article.getHref().replaceFirst(request.getContextPath(), ""));
|
||||
String ctxPath = Global.getCtxPath();
|
||||
if (article.getHref().startsWith(ctxPath)) {
|
||||
article.setHref(article.getHref().replaceFirst(ctxPath, StringUtils.EMPTY));
|
||||
}
|
||||
return "redirect:" + article.getHref();
|
||||
return REDIRECT + article.getHref();
|
||||
}
|
||||
|
||||
model.addAttribute("article", article);
|
||||
|
||||
@@ -25,4 +25,5 @@
|
||||
5.6.0
|
||||
5.6.1
|
||||
5.7.0
|
||||
5.7.1
|
||||
5.7.1
|
||||
5.8.0
|
||||
@@ -1,4 +1,4 @@
|
||||
body{padding-top:50px;font-size:15px;background:#f7f8f9;}
|
||||
body{padding-top:50px;font-size:15px;background:#f7f8f9;font-family:Arial, sans-serif;}
|
||||
body>.navbar{-webkit-transition:background-color .3s ease-in;transition:background-color .3s ease-in}
|
||||
@media (min-width:768px){
|
||||
body>.navbar-transparent{background-color:transparent}
|
||||
@@ -51,6 +51,7 @@ footer p{clear:left;margin-bottom:0}
|
||||
#banner{margin-bottom:2em;text-align:center}
|
||||
}
|
||||
|
||||
.navbar-inverse {border-bottom:0;}
|
||||
.breadcrumb {border-radius:8px;background:transparent;padding:0;margin:2px 15px 21px 15px;}
|
||||
|
||||
.jumbotron {background:#fff;margin:48px auto;border:1px solid #ededed;box-shadow:0 1px 4px 0 rgb(0 0 0 / 5%);border-radius:8px!important;}
|
||||
@@ -64,8 +65,9 @@ footer p{clear:left;margin-bottom:0}
|
||||
.panel-title small .more {padding-top:4px;font-size:14px}
|
||||
|
||||
.nav-search {margin-top:9px;}
|
||||
.nav-search .form-control {height:30px;padding:5px;}
|
||||
.nav-search .btn {height:31px;padding:5px 10px;}
|
||||
.nav-search .form-control {height:30px;line-height:30px;padding:5px;border-radius:4px;}
|
||||
.nav-search .btn {height:31px;padding:5px 10px;border-radius:15px;outline:none;}
|
||||
.nav-search .btn:focus {outline:none;}
|
||||
|
||||
.main {background:#fff;box-shadow:0 1px 4px 0 rgb(0 0 0 / 8%);border-radius:0 0 8px 8px;padding:20px 10px;margin:0 -1px}
|
||||
.main-list {border-radius:8px;}
|
||||
|
||||
@@ -40,7 +40,9 @@
|
||||
<div class="form-group" title="填写关键字,按 Enter 键进行全文检索...">
|
||||
<input type="text" name="q" class="form-control" placeholder="全站搜索...">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary hide">搜索</button>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</form>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>5.7.1-SNAPSHOT</version>
|
||||
<version>5.8.0-SNAPSHOT</version>
|
||||
<relativePath>../../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -106,6 +106,13 @@
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Data/Dynamic Base Manage -->
|
||||
<dependency>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-framework-dbm</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- ELK 日志收集 -->
|
||||
<dependency>
|
||||
<groupId>net.logstash.logback</groupId>
|
||||
|
||||
@@ -55,9 +55,9 @@ public class ShiroAutoConfiguration {
|
||||
@ConditionalOnMissingBean(name="shiroFilterProxy")
|
||||
public FilterRegistrationBean<Filter> shiroFilterProxy(ShiroFilterFactoryBean shiroFilter) throws Exception {
|
||||
FilterRegistrationBean<Filter> bean = new FilterRegistrationBean<>();
|
||||
bean.setOrder(Ordered.HIGHEST_PRECEDENCE + 5000);
|
||||
bean.setFilter(shiroFilter.getObject());
|
||||
bean.addUrlPatterns("/*");
|
||||
bean.setOrder(Ordered.HIGHEST_PRECEDENCE + 5000);
|
||||
return bean;
|
||||
}
|
||||
|
||||
|
||||
@@ -304,6 +304,11 @@ public class FormFilter extends org.apache.shiro.web.filter.authc.FormAuthentica
|
||||
String successUrl = getSuccessUrl(); // shiro.successUrl in application.yml
|
||||
if (StringUtils.contains((request).getRequestURI(), "/oauth2/callback/")) {
|
||||
successUrl = Global.getConfig("oauth2.successUrl", successUrl);
|
||||
} else if (StringUtils.contains((request).getRequestURI(), "/sso")) {
|
||||
String ssoSuccessUrl = (String)request.getAttribute("__url");
|
||||
if (StringUtils.isNotBlank(ssoSuccessUrl)) {
|
||||
successUrl = ssoSuccessUrl;
|
||||
}
|
||||
}
|
||||
ServletUtils.redirectUrl(request, (HttpServletResponse)response, successUrl);
|
||||
return false;
|
||||
|
||||
@@ -4,23 +4,21 @@
|
||||
*/
|
||||
package com.jeesite.common.shiro.filter;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.authz.UnauthorizedException;
|
||||
import org.apache.shiro.subject.Subject;
|
||||
import org.apache.shiro.web.util.WebUtils;
|
||||
|
||||
import com.jeesite.common.codec.EncodeUtils;
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.web.http.ServletUtils;
|
||||
import com.jeesite.common.web.http.wrapper.GetHttpServletRequestWrapper;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.authz.UnauthorizedException;
|
||||
import org.apache.shiro.subject.Subject;
|
||||
import org.apache.shiro.web.util.WebUtils;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* 权限字符串过滤器
|
||||
@@ -65,7 +63,8 @@ public class PermissionsFilter extends org.apache.shiro.web.filter.authz.Permiss
|
||||
// AJAX不支持Redirect改用Forward
|
||||
String loginUrl = Global.getProperty("shiro.defaultPath");
|
||||
HttpServletRequest req = ((HttpServletRequest) request);
|
||||
if (StringUtils.equals(req.getContextPath()+loginUrl, req.getRequestURI())){
|
||||
|
||||
if (StringUtils.equals(Global.getCtxPath() + loginUrl, req.getRequestURI())){
|
||||
loginUrl = Global.getProperty("shiro.loginUrl");
|
||||
}
|
||||
if (ServletUtils.isAjaxRequest(req)) {
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
package com.jeesite.common.ueditor;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.ueditor.define.ActionMap;
|
||||
import com.jeesite.common.ueditor.define.AppInfo;
|
||||
@@ -12,6 +8,9 @@ import com.jeesite.common.ueditor.define.State;
|
||||
import com.jeesite.common.ueditor.hunter.FileManager;
|
||||
import com.jeesite.common.ueditor.hunter.ImageHunter;
|
||||
import com.jeesite.common.ueditor.upload.Uploader;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class ActionEnter {
|
||||
|
||||
@@ -32,7 +31,7 @@ public class ActionEnter {
|
||||
this.request = request;
|
||||
this.rootPath = rootPath;
|
||||
this.actionType = actionType;
|
||||
this.contextPath = request.getContextPath();
|
||||
this.contextPath = Global.getCtxPath();
|
||||
this.configManager = ConfigManager.getInstance(this.rootPath, this.contextPath, request.getRequestURI());
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
package com.jeesite.common.ueditor.hunter;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.ueditor.PathFormat;
|
||||
import com.jeesite.common.ueditor.define.AppInfo;
|
||||
import com.jeesite.common.ueditor.define.BaseState;
|
||||
import com.jeesite.common.ueditor.define.MultiState;
|
||||
import com.jeesite.common.ueditor.define.State;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
public class FileManager {
|
||||
|
||||
@@ -70,7 +69,7 @@ public class FileManager {
|
||||
if (index >= 0) {
|
||||
url = url.substring(index + USERFILES_BASE_URL.length());
|
||||
}
|
||||
fileState.putInfo("url", request.getContextPath() + USERFILES_BASE_URL + url);
|
||||
fileState.putInfo("url", Global.getCtxPath() + USERFILES_BASE_URL + url);
|
||||
state.addState(fileState);
|
||||
}
|
||||
return state;
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
package com.jeesite.common.ueditor.hunter;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.ueditor.PathFormat;
|
||||
import com.jeesite.common.ueditor.define.*;
|
||||
import com.jeesite.common.ueditor.upload.StorageManager;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.InetAddress;
|
||||
import java.net.URL;
|
||||
@@ -8,18 +15,6 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
||||
import com.jeesite.common.ueditor.PathFormat;
|
||||
import com.jeesite.common.ueditor.define.AppInfo;
|
||||
import com.jeesite.common.ueditor.define.BaseState;
|
||||
import com.jeesite.common.ueditor.define.MIMEType;
|
||||
import com.jeesite.common.ueditor.define.MultiState;
|
||||
import com.jeesite.common.ueditor.define.State;
|
||||
import com.jeesite.common.ueditor.upload.StorageManager;
|
||||
|
||||
/**
|
||||
* 图片抓取器
|
||||
*
|
||||
@@ -80,7 +75,7 @@ public class ImageHunter {
|
||||
String physicalPath = this.rootPath + savePath;
|
||||
State state = StorageManager.saveFileByInputStream(connection.getInputStream(), physicalPath);
|
||||
if (state.isSuccess()) {
|
||||
state.putInfo("url", request.getContextPath() + PathFormat.format(savePath));
|
||||
state.putInfo("url", Global.getCtxPath() + PathFormat.format(savePath));
|
||||
state.putInfo("source", urlStr);
|
||||
}
|
||||
return state;
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
package com.jeesite.common.ueditor.upload;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.ueditor.PathFormat;
|
||||
import com.jeesite.common.ueditor.define.AppInfo;
|
||||
import com.jeesite.common.ueditor.define.BaseState;
|
||||
import com.jeesite.common.ueditor.define.FileType;
|
||||
import com.jeesite.common.ueditor.define.State;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Map;
|
||||
|
||||
public final class Base64Uploader {
|
||||
|
||||
@@ -27,8 +26,8 @@ public final class Base64Uploader {
|
||||
String physicalPath = (String) conf.get("rootPath") + savePath;
|
||||
State storageState = StorageManager.saveBinaryFile(data, physicalPath);
|
||||
if (storageState.isSuccess()) {
|
||||
String ctx = request.getContextPath(); // ThinkGem 修正上传图片后返回无contextpath问题
|
||||
storageState.putInfo("url", ctx + PathFormat.format(savePath));
|
||||
String ctxPath = Global.getCtxPath(); // ThinkGem 修正上传图片后返回无contextpath问题
|
||||
storageState.putInfo("url", ctxPath + PathFormat.format(savePath));
|
||||
storageState.putInfo("type", suffix);
|
||||
storageState.putInfo("original", "");
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.jeesite.common.ueditor.upload;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.image.ImageUtils;
|
||||
import com.jeesite.common.io.FileUtils;
|
||||
import com.jeesite.common.media.VideoUtils;
|
||||
@@ -73,7 +74,7 @@ public class BinaryUploader {
|
||||
|
||||
if (storageState != null && storageState.isSuccess()) {
|
||||
int actionCode = ((Integer) conf.get("actionCode")).intValue();
|
||||
String ctx = request.getContextPath(); // ThinkGem 修正上传图片后返回无contextpath问题
|
||||
String ctxPath = Global.getCtxPath(); // ThinkGem 修正上传图片后返回无contextpath问题
|
||||
|
||||
// 上传图片后,进行图片压缩
|
||||
if (actionCode == ActionMap.UPLOAD_IMAGE) {
|
||||
@@ -105,7 +106,7 @@ public class BinaryUploader {
|
||||
};
|
||||
thread.setDaemon(true);
|
||||
thread.start();
|
||||
storageState.putInfo("url", ctx + PathFormat.format(savePath) + "." + v.getOutputFileExtension());
|
||||
storageState.putInfo("url", ctxPath + PathFormat.format(savePath) + "." + v.getOutputFileExtension());
|
||||
storageState.putInfo("type", "." + v.getOutputFileExtension());
|
||||
storageState.putInfo("original", originFileName + "." + v.getInputFileExtension());
|
||||
|
||||
@@ -115,7 +116,7 @@ public class BinaryUploader {
|
||||
return storageState;
|
||||
}
|
||||
}
|
||||
storageState.putInfo("url", ctx + PathFormat.format(savePath));
|
||||
storageState.putInfo("url", ctxPath + PathFormat.format(savePath));
|
||||
storageState.putInfo("type", suffix);
|
||||
storageState.putInfo("original", originFileName + suffix);
|
||||
|
||||
|
||||
@@ -8,10 +8,8 @@ import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.ueditor.define.AppInfo;
|
||||
import com.jeesite.common.ueditor.define.BaseState;
|
||||
import com.jeesite.common.ueditor.define.State;
|
||||
import com.jeesite.common.web.http.ServletUtils;
|
||||
import com.jeesite.modules.file.utils.FileUploadUtils;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.*;
|
||||
|
||||
public class StorageManager {
|
||||
@@ -204,8 +202,7 @@ public class StorageManager {
|
||||
String url = FileUploadUtils.ossFileUpload(file, StringUtils.substringAfter(
|
||||
FileUtils.path(file.getAbsolutePath()), Global.USERFILES_BASE_URL));
|
||||
if (!StringUtils.contains(url, "://")) {
|
||||
HttpServletRequest request = ServletUtils.getRequest();
|
||||
url = FileUtils.path((request != null ? request.getContextPath() : StringUtils.EMPTY) + url);
|
||||
url = FileUtils.path(Global.getCtxPath() + url);
|
||||
}
|
||||
storageState.putInfo("url", url);
|
||||
}
|
||||
|
||||
@@ -23,9 +23,9 @@ import org.springframework.core.Ordered;
|
||||
public class SchemeHttpsConfig {
|
||||
|
||||
@Bean
|
||||
public FilterRegistrationBean<Filter> schemeFilterRegistrationBean() {
|
||||
public FilterRegistrationBean<Filter> schemeHttpsFilter() {
|
||||
FilterRegistrationBean<Filter> bean = new FilterRegistrationBean<>();
|
||||
bean.setOrder(Ordered.HIGHEST_PRECEDENCE);
|
||||
bean.setName("schemeHttpsFilter");
|
||||
bean.setFilter((request, response, chain) -> {
|
||||
chain.doFilter(new HttpServletRequestWrapper((HttpServletRequest) request) {
|
||||
@Override
|
||||
|
||||
@@ -30,7 +30,8 @@ public class IpAddrFilterConfig {
|
||||
@Bean
|
||||
public FilterRegistrationBean<Filter> ipAddrFilter() {
|
||||
FilterRegistrationBean<Filter> bean = new FilterRegistrationBean<>();
|
||||
bean.setOrder(Ordered.HIGHEST_PRECEDENCE);
|
||||
bean.setName("ipAddrFilter");
|
||||
bean.setOrder(Ordered.HIGHEST_PRECEDENCE + 10);
|
||||
bean.setFilter((setvletRequest, setvletResponse, chain) -> {
|
||||
if (isAccessAllowed(setvletRequest, setvletResponse)) {
|
||||
chain.doFilter(setvletRequest, setvletResponse);
|
||||
|
||||
@@ -74,6 +74,9 @@ public class MsgInnerServiceSupport extends CrudService<MsgInnerDao, MsgInner>
|
||||
* 查询消息记录数据
|
||||
*/
|
||||
public List<MsgInnerRecord> findRecordList(MsgInnerRecord msgInnerRecord){
|
||||
if (StringUtils.isBlank(msgInnerRecord.getMsgInnerId())) {
|
||||
return ListUtils.newArrayList();
|
||||
}
|
||||
return msgInnerRecordDao.findList(msgInnerRecord);
|
||||
}
|
||||
|
||||
@@ -206,6 +209,9 @@ public class MsgInnerServiceSupport extends CrudService<MsgInnerDao, MsgInner>
|
||||
*/
|
||||
@Transactional
|
||||
public void readMsgInnerRecord(MsgInner msgInner){
|
||||
if (StringUtils.isBlank(msgInner.getId())) {
|
||||
return;
|
||||
}
|
||||
MsgInnerRecord msgInnerRecord = new MsgInnerRecord();
|
||||
msgInnerRecord.setMsgInnerId(msgInner.getId());
|
||||
msgInnerRecord.setReceiveUserCode(msgInner.currentUser().getUserCode());
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
*/
|
||||
package com.jeesite.modules.sys.interceptor;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.service.BaseService;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.common.web.http.UserAgentUtils;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.service.BaseService;
|
||||
import com.jeesite.common.web.http.UserAgentUtils;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 手机端视图拦截器
|
||||
@@ -32,7 +32,7 @@ public class MobileInterceptor extends BaseService implements HandlerInterceptor
|
||||
ModelAndView modelAndView) throws Exception {
|
||||
if (modelAndView != null){
|
||||
// 如果是手机或平板访问的话,则跳转到手机视图页面。
|
||||
if(UserAgentUtils.isMobileOrTablet(request) && !StringUtils.startsWithIgnoreCase(modelAndView.getViewName(), "redirect:")){
|
||||
if(UserAgentUtils.isMobileOrTablet(request) && !StringUtils.startsWithIgnoreCase(modelAndView.getViewName(), BaseController.REDIRECT)){
|
||||
modelAndView.setViewName("mobile/" + modelAndView.getViewName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,8 +117,7 @@ public class LogUtils {
|
||||
Object targetData = request.getAttribute(WebDataBinder.class.getName()+".TARGET");
|
||||
|
||||
// 异步保存日志
|
||||
logThreadPool.submit(new SaveLogThread(log, handler, request.getContextPath(),
|
||||
throwable, sourceData, targetData));
|
||||
logThreadPool.submit(new SaveLogThread(log, handler, Global.getCtxPath(), throwable, sourceData, targetData));
|
||||
}
|
||||
/**
|
||||
* 保存日志线程
|
||||
|
||||
@@ -230,10 +230,11 @@ public class LoginController extends BaseController{
|
||||
successUrl = (String)request.getAttribute("__url");
|
||||
}
|
||||
if (StringUtils.contains(successUrl, "://")){
|
||||
String ctxPath = Global.getCtxPath();
|
||||
String domain = ServletUtils.getRequestDomain(successUrl);
|
||||
successUrl = StringUtils.substring(successUrl, domain.length());
|
||||
if (StringUtils.startsWith(successUrl, request.getContextPath())) {
|
||||
successUrl = StringUtils.substringAfter(successUrl, request.getContextPath());
|
||||
if (StringUtils.startsWith(successUrl, ctxPath)) {
|
||||
successUrl = StringUtils.substringAfter(successUrl, ctxPath);
|
||||
}
|
||||
}
|
||||
if (StringUtils.isBlank(successUrl)){
|
||||
@@ -251,7 +252,7 @@ public class LoginController extends BaseController{
|
||||
}
|
||||
model.addAttribute("sessionid", (String)session.getId());
|
||||
if (!StringUtils.contains(successUrl, "://")){
|
||||
successUrl = request.getContextPath() + successUrl;
|
||||
successUrl = Global.getCtxPath() + successUrl;
|
||||
}
|
||||
model.addAttribute("__url", successUrl); // 告诉浏览器登录后跳转的页面
|
||||
// 初始密码策略和密码修改策略验证(0:关闭;1:提醒用户;2:强制修改初始或旧密码)
|
||||
@@ -364,7 +365,7 @@ public class LoginController extends BaseController{
|
||||
*/
|
||||
@RequiresPermissions("user")
|
||||
@RequestMapping(value = "switch/{sysCode}")
|
||||
public String switchSys(@PathVariable String sysCode) {
|
||||
public String switchSys(@PathVariable String sysCode, HttpServletRequest request) {
|
||||
Session session = UserUtils.getSession();
|
||||
if (StringUtils.isNotBlank(sysCode)){
|
||||
session.setAttribute("sysCode", sysCode);
|
||||
@@ -372,6 +373,9 @@ public class LoginController extends BaseController{
|
||||
session.removeAttribute("sysCode");
|
||||
}
|
||||
UserUtils.removeCache(UserUtils.CACHE_AUTH_INFO+"_"+session.getId());
|
||||
if (ServletUtils.isAjaxRequest(request)) {
|
||||
return renderResult(Global.TRUE, text("子系统切换成功"));
|
||||
}
|
||||
return REDIRECT + adminPath + "/index";
|
||||
}
|
||||
|
||||
@@ -380,7 +384,7 @@ public class LoginController extends BaseController{
|
||||
*/
|
||||
@RequiresPermissions("user")
|
||||
@RequestMapping(value = {"switchRole","switchRole/{roleCode}"})
|
||||
public String switchRole(@PathVariable(required=false) String roleCode) {
|
||||
public String switchRole(@PathVariable(required=false) String roleCode, HttpServletRequest request) {
|
||||
Session session = UserUtils.getSession();
|
||||
if (StringUtils.isNotBlank(roleCode)){
|
||||
session.setAttribute("roleCode", roleCode);
|
||||
@@ -388,6 +392,9 @@ public class LoginController extends BaseController{
|
||||
session.removeAttribute("roleCode");
|
||||
}
|
||||
UserUtils.removeCache(UserUtils.CACHE_AUTH_INFO+"_"+session.getId());
|
||||
if (ServletUtils.isAjaxRequest(request)) {
|
||||
return renderResult(Global.TRUE, text("角色切换成功"));
|
||||
}
|
||||
return REDIRECT + adminPath + "/index";
|
||||
}
|
||||
|
||||
|
||||
@@ -698,7 +698,7 @@ file:
|
||||
# 文件上传根路径,设置路径中不允许包含“userfiles”,在指定目录中系统会自动创建userfiles目录,如果不设置默认为contextPath路径
|
||||
#baseDir: D:/jeesite
|
||||
|
||||
# 上传文件的相对路径(支持:yyyy, MM, dd, HH, mm, ss, E)
|
||||
# 上传文件的相对路径(支持:yyyy、MM、dd、HH、mm、ss、E、bizType、corpCode、userCode、userType、userCache中的key)
|
||||
uploadPath: '{yyyy}{MM}/'
|
||||
|
||||
# 上传单个文件最大字节(500M),在这之上还有 > Tomcat限制 > Nginx限制,等,此设置会覆盖 spring.http.multipart.maxFileSize 设置
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<logger name="org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator" level="DEBUG" />
|
||||
<!-- <logger name="org.springframework.transaction.support.TransactionSynchronizationManager" level="TRACE" /> -->
|
||||
<logger name="org.springframework.web.servlet.PageNotFound" level="ERROR" />
|
||||
<logger name="org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker" level="ERROR" />
|
||||
|
||||
<logger name="springfox.documentation.spring.web.readers.parameter.ParameterDataTypeReader" level="ERROR" />
|
||||
<logger name="springfox.documentation.schema.property.CachingModelPropertiesProvider" level="ERROR" />
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
const { t } = useI18n('${moduleName}${isNotEmpty(subModuleName)?'.'+subModuleName:''}.${className}');
|
||||
const { showMessage, showMessageModal } = useMessage();
|
||||
|
||||
const fileList = ref(FileType[]);
|
||||
const fileList = ref<FileType[]>([]);
|
||||
const uploadInfo = ref('');
|
||||
|
||||
const beforeUpload = (file: FileType) => {
|
||||
|
||||
@@ -4,7 +4,7 @@ productName: JeeSite Demo
|
||||
companyName: ThinkGem
|
||||
|
||||
# 产品版本、版权年份
|
||||
productVersion: V5.7
|
||||
productVersion: V5.8
|
||||
copyrightYear: 2024
|
||||
|
||||
# 数据库连接
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-modules</artifactId>
|
||||
<version>5.7.1-SNAPSHOT</version>
|
||||
<version>5.8.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>JeeSite Modules</name>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>5.7.1-SNAPSHOT</version>
|
||||
<version>5.8.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>JeeSite Parent</name>
|
||||
@@ -26,8 +26,8 @@
|
||||
<commons-text.version>1.10.0</commons-text.version>
|
||||
<commons-email.version>1.5</commons-email.version>
|
||||
|
||||
<jackson-bom2.version>2.16.0</jackson-bom2.version>
|
||||
<fastjson.version>2.0.43</fastjson.version>
|
||||
<jackson-bom2.version>2.17.1</jackson-bom2.version>
|
||||
<fastjson.version>2.0.51</fastjson.version>
|
||||
<fst.version>2.57</fst.version>
|
||||
<snakeyaml.version>1.33</snakeyaml.version>
|
||||
<activation.version>1.1.1</activation.version>
|
||||
@@ -35,31 +35,32 @@
|
||||
|
||||
<metadata-extractor.version>2.11.0</metadata-extractor.version>
|
||||
<thumbnailator.version>0.4.19</thumbnailator.version>
|
||||
<twelvemonkeys.version>3.9.3</twelvemonkeys.version>
|
||||
<twelvemonkeys.version>3.11.0</twelvemonkeys.version>
|
||||
<blade-patchca.version>1.1.2</blade-patchca.version>
|
||||
<jmimemagic.version>0.1.5</jmimemagic.version>
|
||||
<zxing.version>3.5.1</zxing.version>
|
||||
<zxing.version>3.5.3</zxing.version>
|
||||
|
||||
<poi.version>5.2.3</poi.version>
|
||||
<poi.version>5.2.5</poi.version>
|
||||
<pinyin4j.version>2.5.1</pinyin4j.version>
|
||||
<groovy.version>3.0.17</groovy.version>
|
||||
|
||||
<joda-time.version>2.10.4</joda-time.version>
|
||||
<joda-time.version>2.12.7</joda-time.version>
|
||||
<logstash-logback.version>7.3</logstash-logback.version>
|
||||
<elasticsearch.version>7.17.8</elasticsearch.version>
|
||||
<lucene.version>8.11.1</lucene.version>
|
||||
|
||||
<!-- framework version setting -->
|
||||
<mybatis.version>3.5.14</mybatis.version>
|
||||
<mybatis.version>3.5.15</mybatis.version>
|
||||
<mybatis-spring.version>2.0.7</mybatis-spring.version>
|
||||
<jsqlparser.version>4.6</jsqlparser.version>
|
||||
<druid.version>1.2.21</druid.version>
|
||||
<jsqlparser.version>4.7</jsqlparser.version>
|
||||
<druid.version>1.2.23</druid.version>
|
||||
<shiro.version>1.13.0</shiro.version>
|
||||
<j2cache.version>2.8.0-release</j2cache.version>
|
||||
<swagger.version>1.6.6</swagger.version>
|
||||
<liquibase.version>4.20.0</liquibase.version>
|
||||
|
||||
<!-- jdbc setting -->
|
||||
<mysql.version>8.0.33</mysql.version>
|
||||
<h2.version>1.4.200</h2.version>
|
||||
|
||||
<!-- environment setting -->
|
||||
|
||||
2
pom.xml
2
pom.xml
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite</artifactId>
|
||||
<version>5.7.1-SNAPSHOT</version>
|
||||
<version>5.8.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>JeeSite</name>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-root</artifactId>
|
||||
<version>5.7.1-SNAPSHOT</version>
|
||||
<version>5.8.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>JeeSite Root</name>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>5.7.1-SNAPSHOT</version>
|
||||
<version>5.8.0-SNAPSHOT</version>
|
||||
<relativePath>../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ productName: JeeSite Demo
|
||||
companyName: ThinkGem
|
||||
|
||||
# 产品版本、版权年份
|
||||
productVersion: V5.7
|
||||
productVersion: V5.8
|
||||
copyrightYear: 2024
|
||||
|
||||
# 是否演示模式
|
||||
@@ -836,7 +836,7 @@ file:
|
||||
# # 文件上传根路径,设置路径中不允许包含“userfiles”,在指定目录中系统会自动创建userfiles目录,如果不设置默认为contextPath路径
|
||||
# #baseDir: D:/jeesite
|
||||
#
|
||||
# # 上传文件的相对路径(支持:yyyy, MM, dd, HH, mm, ss, E)
|
||||
# # 上传文件的相对路径(支持:yyyy、MM、dd、HH、mm、ss、E、bizType、corpCode、userCode、userType、userCache中的key)
|
||||
# uploadPath: '{yyyy}{MM}/'
|
||||
#
|
||||
# # 上传单个文件最大字节(500M),在这之上还有 > Tomcat限制 > Nginx限制,等,此设置会覆盖 spring.http.multipart.maxFileSize 设置
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>5.7.1-SNAPSHOT</version>
|
||||
<version>5.8.0-SNAPSHOT</version>
|
||||
<relativePath>../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
<dependency>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-vue-dist</artifactId>
|
||||
<version>5.7.1-SNAPSHOT</version>
|
||||
<version>5.8.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -7,7 +7,7 @@ jdbc:
|
||||
# Mysql 数据库配置
|
||||
type: h2
|
||||
driver: org.h2.Driver
|
||||
url: jdbc:h2:/data/jeesite-db/jeesite571
|
||||
url: jdbc:h2:/data/jeesite-db/jeesite580
|
||||
username: jeesite
|
||||
password: jeesite
|
||||
testSql: SELECT 1
|
||||
|
||||
@@ -8,7 +8,7 @@ productName: JeeSite Demo
|
||||
companyName: ThinkGem
|
||||
|
||||
# 产品版本、版权年份
|
||||
productVersion: V5.7
|
||||
productVersion: V5.8
|
||||
copyrightYear: 2024
|
||||
|
||||
# 是否演示模式
|
||||
@@ -53,7 +53,7 @@ jdbc:
|
||||
# H2 数据库配置(请修改 /modules/core/pom.xml 文件,打开 H2 DB 依赖)
|
||||
type: h2
|
||||
driver: org.h2.Driver
|
||||
url: jdbc:h2:~/jeesite-db/jeesite571
|
||||
url: jdbc:h2:~/jeesite-db/jeesite580
|
||||
username: jeesite
|
||||
password: jeesite
|
||||
testSql: SELECT 1
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>5.7.1-SNAPSHOT</version>
|
||||
<version>5.8.0-SNAPSHOT</version>
|
||||
<relativePath>../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ productName: JeeSite Demo
|
||||
companyName: ThinkGem
|
||||
|
||||
# 产品版本、版权年份
|
||||
productVersion: V5.7
|
||||
productVersion: V5.8
|
||||
copyrightYear: 2024
|
||||
|
||||
# 是否演示模式
|
||||
@@ -836,7 +836,7 @@ file:
|
||||
# # 文件上传根路径,设置路径中不允许包含“userfiles”,在指定目录中系统会自动创建userfiles目录,如果不设置默认为contextPath路径
|
||||
# #baseDir: D:/jeesite
|
||||
#
|
||||
# # 上传文件的相对路径(支持:yyyy, MM, dd, HH, mm, ss, E)
|
||||
# # 上传文件的相对路径(支持:yyyy、MM、dd、HH、mm、ss、E、bizType、corpCode、userCode、userType、userCache中的key)
|
||||
# uploadPath: '{yyyy}{MM}/'
|
||||
#
|
||||
# # 上传单个文件最大字节(500M),在这之上还有 > Tomcat限制 > Nginx限制,等,此设置会覆盖 spring.http.multipart.maxFileSize 设置
|
||||
|
||||
Reference in New Issue
Block a user