错误页面优化、兼容war和jar方式、升级beetl2.7.26
This commit is contained in:
@@ -16,8 +16,6 @@ import com.jeesite.common.lang.StringUtils;
|
|||||||
import com.jeesite.common.mybatis.annotation.Column;
|
import com.jeesite.common.mybatis.annotation.Column;
|
||||||
import com.jeesite.common.mybatis.annotation.Table;
|
import com.jeesite.common.mybatis.annotation.Table;
|
||||||
import com.jeesite.common.mybatis.mapper.query.QueryType;
|
import com.jeesite.common.mybatis.mapper.query.QueryType;
|
||||||
import com.jeesite.common.shiro.realm.LoginInfo;
|
|
||||||
import com.jeesite.modules.sys.utils.UserUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作日志Entity
|
* 操作日志Entity
|
||||||
@@ -103,10 +101,6 @@ public class Log extends DataEntity<Log> {
|
|||||||
|
|
||||||
@Length(min=0, max=500, message="请求URI长度不能超过 500 个字符")
|
@Length(min=0, max=500, message="请求URI长度不能超过 500 个字符")
|
||||||
public String getRequestUri() {
|
public String getRequestUri() {
|
||||||
LoginInfo p = UserUtils.getLoginInfo();
|
|
||||||
if (p != null && "1".equals(p.getParam("l"))){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return requestUri;
|
return requestUri;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -233,7 +233,9 @@ public class LoginController extends BaseController{
|
|||||||
|
|
||||||
// 设置共享SessionId的Cookie值,睿思BI使用。
|
// 设置共享SessionId的Cookie值,睿思BI使用。
|
||||||
String cookieName = Global.getProperty("session.shareSessionIdCookieName");
|
String cookieName = Global.getProperty("session.shareSessionIdCookieName");
|
||||||
CookieUtils.setCookie((HttpServletResponse)response, cookieName, (String)session.getId());
|
if (StringUtils.isNotBlank(cookieName)){
|
||||||
|
CookieUtils.setCookie((HttpServletResponse)response, cookieName, (String)session.getId());
|
||||||
|
}
|
||||||
|
|
||||||
// 如果是登录操作,则设置登录信息(移动端用)
|
// 如果是登录操作,则设置登录信息(移动端用)
|
||||||
model.addAttribute("result", Global.TRUE);
|
model.addAttribute("result", Global.TRUE);
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ session:
|
|||||||
sessionIdCookieName: jeesite.session.id
|
sessionIdCookieName: jeesite.session.id
|
||||||
|
|
||||||
#共享的SessionId的Cookie名称,保存到跟路径下,第三方应用获取。同一域名下多个项目时需设置共享Cookie的名称。
|
#共享的SessionId的Cookie名称,保存到跟路径下,第三方应用获取。同一域名下多个项目时需设置共享Cookie的名称。
|
||||||
shareSessionIdCookieName: ${session.sessionIdCookieName}
|
#shareSessionIdCookieName: ${session.sessionIdCookieName}
|
||||||
|
|
||||||
# MyBatis 相关
|
# MyBatis 相关
|
||||||
mybatis:
|
mybatis:
|
||||||
|
|||||||
@@ -36,24 +36,22 @@
|
|||||||
<div class="form-group has-feedback" id="isValidCodeLogin" style="display:${isValidCodeLogin?'blank':'none'}">
|
<div class="form-group has-feedback" id="isValidCodeLogin" style="display:${isValidCodeLogin?'blank':'none'}">
|
||||||
<#form:validcode name="validCode" isRequired="true" isRemote="true" isLazy="false"/>
|
<#form:validcode name="validCode" isRequired="true" isRemote="true" isLazy="false"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="form-group">
|
||||||
<div class="col-xs-8">
|
<div class="mt5 icheck">
|
||||||
<div class="mt5 icheck">
|
<label title="公共场所慎用,下次不需要再填写帐号"><input type="checkbox"
|
||||||
<label title="公共场所慎用,下次不需要再填写帐号"><input type="checkbox"
|
name="rememberUserCode"${isNotBlank(cookie('rememberUserCode'))?' checked':''}
|
||||||
name="rememberUserCode"${isNotBlank(cookie('rememberUserCode'))?' checked':''}
|
class="form-control" data-style="square-blue"> 记住账号</label>
|
||||||
class="form-control" data-style="square-blue"> 记住账号</label>
|
<label title="公共场所慎用,下次不需要再填写帐号和密码"><input type="checkbox"
|
||||||
<label title="公共场所慎用,下次不需要再填写帐号和密码"><input type="checkbox"
|
name="rememberMe"${isNotBlank(cookie('rememberMe'))?' checked':''}
|
||||||
name="rememberMe"${isNotBlank(cookie('rememberMe'))?' checked':''}
|
class="form-control" data-style="square-blue"> 记住密码</label>
|
||||||
class="form-control" data-style="square-blue"> 记住密码</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-4">
|
|
||||||
<button type="submit" class="btn btn-primary btn-block btn-flat">登 录</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<button type="submit" class="btn btn-primary btn-block btn-flat">立即登录</button>
|
||||||
|
</div>
|
||||||
</#form:form>
|
</#form:form>
|
||||||
<div class="row mt10">
|
<div class="row">
|
||||||
<div class="col-xs-12 mt10">
|
<div class="col-xs-12">
|
||||||
<% if(@ObjectUtils.toBoolean(@Global.getConfig('user.registerUser'))){ %>
|
<% if(@ObjectUtils.toBoolean(@Global.getConfig('user.registerUser'))){ %>
|
||||||
<a href="${ctxPath}/account/registerUser" class="pull-right">注册账号</a><% } %>
|
<a href="${ctxPath}/account/registerUser" class="pull-right">注册账号</a><% } %>
|
||||||
<a href="${ctxPath}/account/forgetPwd" class="pull-left">忘记密码</a>
|
<a href="${ctxPath}/account/forgetPwd" class="pull-left">忘记密码</a>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<mybatis-spring.version>1.3.1</mybatis-spring.version>
|
<mybatis-spring.version>1.3.1</mybatis-spring.version>
|
||||||
<druid.version>1.1.3</druid.version>
|
<druid.version>1.1.3</druid.version>
|
||||||
<shiro.version>1.4.0</shiro.version>
|
<shiro.version>1.4.0</shiro.version>
|
||||||
<beetl.version>2.7.11-SNAPSHOT</beetl.version>
|
<beetl.version>2.7-SNAPSHOT</beetl.version>
|
||||||
<ehcache-web.version>2.0.4</ehcache-web.version>
|
<ehcache-web.version>2.0.4</ehcache-web.version>
|
||||||
<quartz.version>2.2.3</quartz.version>
|
<quartz.version>2.2.3</quartz.version>
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,9 @@
|
|||||||
<dependent-module archiveName="jeesite-common-4.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/jeesite-common/jeesite-common">
|
<dependent-module archiveName="jeesite-common-4.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/jeesite-common/jeesite-common">
|
||||||
<dependency-type>uses</dependency-type>
|
<dependency-type>uses</dependency-type>
|
||||||
</dependent-module>
|
</dependent-module>
|
||||||
|
<dependent-module archiveName="beetl-2.7-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/beetl/beetl">
|
||||||
|
<dependency-type>uses</dependency-type>
|
||||||
|
</dependent-module>
|
||||||
<dependent-module archiveName="jeesite-module-devtools-4.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/jeesite-module-devtools/jeesite-module-devtools">
|
<dependent-module archiveName="jeesite-module-devtools-4.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/jeesite-module-devtools/jeesite-module-devtools">
|
||||||
<dependency-type>uses</dependency-type>
|
<dependency-type>uses</dependency-type>
|
||||||
</dependent-module>
|
</dependent-module>
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ public class Application extends SpringBootServletInitializer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
|
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
|
||||||
|
this.setRegisterErrorPageFilter(false); // 错误页面有容器来处理,而不是SpringBoot
|
||||||
builder.properties(PropertiesUtils.getInstance().getProperties());
|
builder.properties(PropertiesUtils.getInstance().getProperties());
|
||||||
return builder.sources(Application.class);
|
return builder.sources(Application.class);
|
||||||
}
|
}
|
||||||
|
|||||||
18
web/src/main/webapp/WEB-INF/web.xml
Normal file
18
web/src/main/webapp/WEB-INF/web.xml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||||
|
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||||
|
version="3.0">
|
||||||
|
|
||||||
|
<display-name>JeeSite</display-name>
|
||||||
|
|
||||||
|
<error-page>
|
||||||
|
<error-code>500</error-code>
|
||||||
|
<location>/error/500</location>
|
||||||
|
</error-page>
|
||||||
|
<error-page>
|
||||||
|
<error-code>404</error-code>
|
||||||
|
<location>/error/404</location>
|
||||||
|
</error-page>
|
||||||
|
|
||||||
|
</web-app>
|
||||||
Reference in New Issue
Block a user