pom优化,继承spring-boot-starter-parent;bat优化
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD>̰汾<CCB0><E6B1BE>Nexus<75><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn clean deploy -Dmaven.test.skip=true -Pdeploy
|
||||
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD>̰汾<CCB0><E6B1BE>Nexus<75><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn clean deploy -Dmaven.test.skip=true -Pdeploy
|
||||
|
||||
pause
|
||||
@@ -1,18 +1,19 @@
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD>빤<EFBFBD><EBB9A4>Javadoc<6F><63><EFBFBD><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn clean javadoc:jar
|
||||
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD>빤<EFBFBD><EBB9A4>Javadoc<6F><63><EFBFBD><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn clean javadoc:jar
|
||||
|
||||
pause
|
||||
@@ -1,18 +1,19 @@
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn clean install -Dmaven.test.skip=true -Ppackage
|
||||
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn clean install -Dmaven.test.skip=true -Ppackage
|
||||
|
||||
pause
|
||||
@@ -37,7 +37,6 @@
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>${commons-codec.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
@@ -47,59 +46,52 @@
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<version>${commons-beanutils.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Java serialization -->
|
||||
<dependency>
|
||||
<groupId>com.esotericsoftware</groupId>
|
||||
<artifactId>kryo</artifactId>
|
||||
<version>${esotericsoftware-kryo.version}</version>
|
||||
<version>${esotericsoftware.kryo.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Org json -->
|
||||
<dependency>
|
||||
<groupId>org.codeartisans</groupId>
|
||||
<artifactId>org.json</artifactId>
|
||||
<version>${codeartisans-json.version}</version>
|
||||
<version>${codeartisans.json.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Jackson json -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
<version>${fasterxml-jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${fasterxml-jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
<artifactId>jackson-dataformat-xml</artifactId>
|
||||
<version>${fasterxml-jackson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Java xml -->
|
||||
<dependency>
|
||||
<groupId>dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<version>${dom4j.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- XPath xml -->
|
||||
<dependency>
|
||||
<groupId>jaxen</groupId>
|
||||
<artifactId>jaxen</artifactId>
|
||||
<version>${jaxen.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Snake YAML -->
|
||||
<dependency>
|
||||
<groupId>org.yaml</groupId>
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
<version>${snakeyaml.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Bean To Bean copy -->
|
||||
@@ -172,13 +164,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.5.3</version>
|
||||
</dependency>
|
||||
<!-- <dependency>
|
||||
<groupId>sun-jaxws</groupId>
|
||||
<artifactId>sjsxp</artifactId>
|
||||
<version>2.1.1</version>
|
||||
</dependency> -->
|
||||
|
||||
<!-- Jsoup HTTP -->
|
||||
<dependency>
|
||||
@@ -242,31 +228,26 @@
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<!-- common-logging 实际调用 slf4j -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<!-- jdk logging 实际调用 slf4j -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jul-to-slf4j</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<!-- log4j 实际调用 slf4j -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>log4j-over-slf4j</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<!-- slf4j logback 实现 -->
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>${logback.version}</version>
|
||||
</dependency>
|
||||
<!-- LOGGING end -->
|
||||
|
||||
@@ -274,31 +255,26 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Bean validate -->
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
<version>${validator.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- JUnit Test -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD>̰汾<CCB0><E6B1BE>Nexus<75><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn clean deploy -Dmaven.test.skip=true -Pdeploy
|
||||
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD>̰汾<CCB0><E6B1BE>Nexus<75><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn clean deploy -Dmaven.test.skip=true -Pdeploy
|
||||
|
||||
pause
|
||||
@@ -1,18 +1,19 @@
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD>빤<EFBFBD><EBB9A4>Javadoc<6F><63><EFBFBD><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn clean javadoc:jar
|
||||
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD>빤<EFBFBD><EBB9A4>Javadoc<6F><63><EFBFBD><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn clean javadoc:jar
|
||||
|
||||
pause
|
||||
@@ -1,18 +1,19 @@
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn clean install -Dmaven.test.skip=true -Ppackage
|
||||
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn clean install -Dmaven.test.skip=true -Ppackage
|
||||
|
||||
pause
|
||||
@@ -1,71 +1,72 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
*/
|
||||
package com.jeesite.common.shiro.filter;
|
||||
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.session.SessionException;
|
||||
import org.apache.shiro.subject.Subject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.web.http.ServletUtils;
|
||||
import com.jeesite.modules.sys.utils.LogUtils;
|
||||
|
||||
/**
|
||||
* 登出过滤器
|
||||
* @author ThinkGem
|
||||
* @version 2017-03-22
|
||||
*/
|
||||
public class LogoutFilter extends org.apache.shiro.web.filter.authc.LogoutFilter {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(LogoutFilter.class);
|
||||
|
||||
@Override
|
||||
protected boolean preHandle(ServletRequest request, ServletResponse response) throws Exception {
|
||||
try{
|
||||
Subject subject = getSubject(request, response);
|
||||
String redirectUrl = getRedirectUrl(request, response, subject);
|
||||
//try/catch added for SHIRO-298:
|
||||
try {
|
||||
// 记录用户退出日志
|
||||
LogUtils.saveLog(ServletUtils.getRequest(), "系统退出");
|
||||
// 退出登录
|
||||
subject.logout();
|
||||
} catch (SessionException ise) {
|
||||
log.debug("Encountered session exception during logout. This can generally safely be ignored.", ise);
|
||||
}
|
||||
|
||||
// 如果是Ajax请求,返回Json字符串。
|
||||
if (ServletUtils.isAjaxRequest((HttpServletRequest)request)){
|
||||
ServletUtils.renderResult((HttpServletResponse)response, Global.TRUE, "退出成功!");
|
||||
return false;
|
||||
}
|
||||
|
||||
issueRedirect(request, response, redirectUrl);
|
||||
}catch(Exception e){
|
||||
log.debug("Encountered session exception during logout. This can generally safely be ignored.", e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 登出跳转URL
|
||||
*/
|
||||
@Override
|
||||
protected String getRedirectUrl(ServletRequest request, ServletResponse response, Subject subject) {
|
||||
String url = Global.getProperty("shiro.logoutUrl");
|
||||
// 如果配置了登出之后跳转的url,并且url不能为 ${adminPath}/logout 否则会造成死循环。
|
||||
if (StringUtils.isNoneBlank(url) && !url.equals((Global.getAdminPath()+"/logout"))){
|
||||
return url;
|
||||
}
|
||||
return super.getRedirectUrl(request, response, subject);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
*/
|
||||
package com.jeesite.common.shiro.filter;
|
||||
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.session.SessionException;
|
||||
import org.apache.shiro.subject.Subject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.web.http.ServletUtils;
|
||||
import com.jeesite.modules.sys.utils.LogUtils;
|
||||
|
||||
/**
|
||||
* 登出过滤器
|
||||
* @author ThinkGem
|
||||
* @version 2017-03-22
|
||||
*/
|
||||
public class LogoutFilter extends org.apache.shiro.web.filter.authc.LogoutFilter {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(LogoutFilter.class);
|
||||
|
||||
@Override
|
||||
protected boolean preHandle(ServletRequest request, ServletResponse response) throws Exception {
|
||||
return super.preHandle(request, response);
|
||||
// try{
|
||||
// Subject subject = getSubject(request, response);
|
||||
// String redirectUrl = getRedirectUrl(request, response, subject);
|
||||
// //try/catch added for SHIRO-298:
|
||||
// try {
|
||||
// // 记录用户退出日志
|
||||
// LogUtils.saveLog(ServletUtils.getRequest(), "系统退出");
|
||||
// // 退出登录
|
||||
// subject.logout();
|
||||
// } catch (SessionException ise) {
|
||||
// log.debug("Encountered session exception during logout. This can generally safely be ignored.", ise);
|
||||
// }
|
||||
//
|
||||
// // 如果是Ajax请求,返回Json字符串。
|
||||
// if (ServletUtils.isAjaxRequest((HttpServletRequest)request)){
|
||||
// ServletUtils.renderResult((HttpServletResponse)response, Global.TRUE, "退出成功!");
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// issueRedirect(request, response, redirectUrl);
|
||||
// }catch(Exception e){
|
||||
// log.debug("Encountered session exception during logout. This can generally safely be ignored.", e);
|
||||
// }
|
||||
// return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 登出跳转URL
|
||||
*/
|
||||
@Override
|
||||
protected String getRedirectUrl(ServletRequest request, ServletResponse response, Subject subject) {
|
||||
return super.getRedirectUrl(request, response, subject);
|
||||
// String url = Global.getProperty("shiro.logoutUrl");
|
||||
// // 如果配置了登出之后跳转的url,并且url不能为 ${adminPath}/logout 否则会造成死循环。
|
||||
// if (StringUtils.isNoneBlank(url) && !url.equals((Global.getAdminPath()+"/logout"))){
|
||||
// return url;
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,81 +1,81 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
*/
|
||||
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.config.Global;
|
||||
import com.jeesite.common.web.http.ServletUtils;
|
||||
import com.jeesite.common.web.http.wrapper.GetHttpServletRequestWrapper;
|
||||
|
||||
/**
|
||||
* 权限字符串过滤器
|
||||
* @author ThinkGem
|
||||
* @version 2017-03-22
|
||||
*/
|
||||
public class PermissionsAuthorizationFilter extends org.apache.shiro.web.filter.authz.PermissionsAuthorizationFilter {
|
||||
|
||||
@Override
|
||||
protected void redirectToLogin(ServletRequest request, ServletResponse response) throws IOException {
|
||||
PermissionsAuthorizationFilter.redirectToDefaultPath(request, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws IOException {
|
||||
return PermissionsAuthorizationFilter.redirectTo403Page(request, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 无访问权限时,跳转到403页面
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
* @throws IOException
|
||||
* @author ThinkGem
|
||||
*/
|
||||
public static boolean redirectTo403Page(ServletRequest request, ServletResponse response) throws IOException {
|
||||
Subject subject = SecurityUtils.getSubject();
|
||||
// If the subject isn't identified, redirect to login URL
|
||||
if (subject.getPrincipal() == null) {
|
||||
redirectToDefaultPath(request, response);
|
||||
} else {
|
||||
try {
|
||||
// 如果访问的是未授权页面,则直接转到403页面(2016-11-3)
|
||||
request.getRequestDispatcher("/error/403").forward(request, response);
|
||||
} catch (ServletException e) {
|
||||
throw new UnauthorizedException(e);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转登录页时,跳转到默认首页
|
||||
*/
|
||||
public static void redirectToDefaultPath(ServletRequest request, ServletResponse response) throws IOException {
|
||||
// AJAX不支持Redirect改用Forward
|
||||
String loginUrl = Global.getProperty("defaultPath");
|
||||
if (ServletUtils.isAjaxRequest((HttpServletRequest) request)) {
|
||||
try {
|
||||
request.getRequestDispatcher(loginUrl).forward(
|
||||
new GetHttpServletRequestWrapper(request), response);
|
||||
} catch (ServletException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}else{
|
||||
WebUtils.issueRedirect(request, response, loginUrl);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
*/
|
||||
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.config.Global;
|
||||
import com.jeesite.common.web.http.ServletUtils;
|
||||
import com.jeesite.common.web.http.wrapper.GetHttpServletRequestWrapper;
|
||||
|
||||
/**
|
||||
* 权限字符串过滤器
|
||||
* @author ThinkGem
|
||||
* @version 2017-03-22
|
||||
*/
|
||||
public class PermissionsAuthorizationFilter extends org.apache.shiro.web.filter.authz.PermissionsAuthorizationFilter {
|
||||
|
||||
@Override
|
||||
protected void redirectToLogin(ServletRequest request, ServletResponse response) throws IOException {
|
||||
PermissionsAuthorizationFilter.redirectToDefaultPath(request, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws IOException {
|
||||
return PermissionsAuthorizationFilter.redirectTo403Page(request, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 无访问权限时,跳转到403页面
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
* @throws IOException
|
||||
* @author ThinkGem
|
||||
*/
|
||||
public static boolean redirectTo403Page(ServletRequest request, ServletResponse response) throws IOException {
|
||||
Subject subject = SecurityUtils.getSubject();
|
||||
// If the subject isn't identified, redirect to login URL
|
||||
if (subject.getPrincipal() == null) {
|
||||
redirectToDefaultPath(request, response);
|
||||
} else {
|
||||
try {
|
||||
// 如果访问的是未授权页面,则直接转到403页面(2016-11-3)
|
||||
request.getRequestDispatcher("/error/403").forward(request, response);
|
||||
} catch (ServletException e) {
|
||||
throw new UnauthorizedException(e);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转登录页时,跳转到默认首页
|
||||
*/
|
||||
public static void redirectToDefaultPath(ServletRequest request, ServletResponse response) throws IOException {
|
||||
// AJAX不支持Redirect改用Forward
|
||||
String loginUrl = Global.getProperty("defaultPath");
|
||||
if (ServletUtils.isAjaxRequest((HttpServletRequest) request)) {
|
||||
try {
|
||||
request.getRequestDispatcher(loginUrl).forward(
|
||||
new GetHttpServletRequestWrapper(request), response);
|
||||
} catch (ServletException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}else{
|
||||
WebUtils.issueRedirect(request, response, loginUrl);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,28 +1,30 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
*/
|
||||
package com.jeesite.common.shiro.filter;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
|
||||
/**
|
||||
* 角色权限过滤器
|
||||
* @author ThinkGem
|
||||
* @version 2017-03-22
|
||||
*/
|
||||
public class RolesAuthorizationFilter extends org.apache.shiro.web.filter.authz.RolesAuthorizationFilter {
|
||||
|
||||
@Override
|
||||
protected void redirectToLogin(ServletRequest request, ServletResponse response) throws IOException {
|
||||
PermissionsAuthorizationFilter.redirectToDefaultPath(request, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws IOException {
|
||||
return PermissionsAuthorizationFilter.redirectTo403Page(request, response);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
*/
|
||||
package com.jeesite.common.shiro.filter;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
|
||||
/**
|
||||
* 角色权限过滤器
|
||||
* @author ThinkGem
|
||||
* @version 2017-03-22
|
||||
*/
|
||||
public class RolesAuthorizationFilter extends org.apache.shiro.web.filter.authz.RolesAuthorizationFilter {
|
||||
|
||||
@Override
|
||||
protected void redirectToLogin(ServletRequest request, ServletResponse response) throws IOException {
|
||||
super.redirectToLogin(request, response);
|
||||
// PermissionsAuthorizationFilter.redirectToDefaultPath(request, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws IOException {
|
||||
return super.onAccessDenied(request, response);
|
||||
// return PermissionsAuthorizationFilter.redirectTo403Page(request, response);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -49,7 +49,6 @@ import com.jeesite.modules.sys.service.UserService;
|
||||
* @author ThinkGem
|
||||
* @version 2017-10-22
|
||||
*/
|
||||
//@Commit
|
||||
public class InitCoreData extends BaseInitDataTests {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -48,12 +48,12 @@ public class LoginController extends BaseController{
|
||||
*/
|
||||
@RequestMapping(value = "login", method = RequestMethod.GET)
|
||||
public String login(HttpServletRequest request, HttpServletResponse response, Model model) {
|
||||
// // 地址中如果包含JSESSIONID,则跳转一次,去掉JSESSIONID信息。
|
||||
// if (StringUtils.containsIgnoreCase(request.getRequestURI(), ";JSESSIONID=")){
|
||||
// String queryString = request.getQueryString();
|
||||
// queryString = queryString == null ? "" : "?" + queryString;
|
||||
// return REDIRECT + adminPath + "/login" + queryString;
|
||||
// }
|
||||
// 地址中如果包含JSESSIONID,则跳转一次,去掉JSESSIONID信息。
|
||||
if (StringUtils.containsIgnoreCase(request.getRequestURI(), ";JSESSIONID=")){
|
||||
String queryString = request.getQueryString();
|
||||
queryString = queryString == null ? "" : "?" + queryString;
|
||||
return REDIRECT + adminPath + "/login" + queryString;
|
||||
}
|
||||
|
||||
LoginInfo loginInfo = UserUtils.getLoginInfo();
|
||||
|
||||
@@ -196,12 +196,12 @@ public class LoginController extends BaseController{
|
||||
*/
|
||||
@RequestMapping(value = "index")
|
||||
public String index(HttpServletRequest request, HttpServletResponse response, Model model) {
|
||||
// // 地址中如果包含JSESSIONID,则跳转一次,去掉JSESSIONID信息。
|
||||
// if (StringUtils.containsIgnoreCase(request.getRequestURI(), ";JSESSIONID=")){
|
||||
// String queryString = request.getQueryString();
|
||||
// queryString = queryString == null ? "" : "?" + queryString;
|
||||
// return REDIRECT + adminPath + "/index" + queryString;
|
||||
// }
|
||||
// 地址中如果包含JSESSIONID,则跳转一次,去掉JSESSIONID信息。
|
||||
if (StringUtils.containsIgnoreCase(request.getRequestURI(), ";JSESSIONID=")){
|
||||
String queryString = request.getQueryString();
|
||||
queryString = queryString == null ? "" : "?" + queryString;
|
||||
return REDIRECT + adminPath + "/index" + queryString;
|
||||
}
|
||||
|
||||
// 验证下用户权限,以便调用doGetAuthorizationInfo方法,保存单点登录登出句柄
|
||||
if (!SecurityUtils.getSubject().isPermitted("user")){
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD>̰汾<CCB0><E6B1BE>Nexus<75><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn clean deploy -Dmaven.test.skip=true -Pdeploy
|
||||
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD>̰汾<CCB0><E6B1BE>Nexus<75><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn clean deploy -Dmaven.test.skip=true -Pdeploy
|
||||
|
||||
pause
|
||||
@@ -1,18 +1,19 @@
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn clean install -Dmaven.test.skip=true -Ppackage
|
||||
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn clean install -Dmaven.test.skip=true -Ppackage
|
||||
|
||||
pause
|
||||
@@ -2,7 +2,7 @@
|
||||
<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>
|
||||
|
||||
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>4.0-SNAPSHOT</version>
|
||||
@@ -12,49 +12,36 @@
|
||||
<url>http://jeesite.com</url>
|
||||
<inceptionYear>2013-Now</inceptionYear>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>1.5.9.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
||||
<!-- common version setting -->
|
||||
<commons-lang3.version>3.4</commons-lang3.version>
|
||||
<commons-io.version>2.5</commons-io.version>
|
||||
<commons-codec.version>1.9</commons-codec.version>
|
||||
<commons-fileupload.version>1.3.1</commons-fileupload.version>
|
||||
<commons-beanutils.version>1.9.2</commons-beanutils.version>
|
||||
<esotericsoftware-kryo.version>4.0.0</esotericsoftware-kryo.version>
|
||||
<codeartisans-json.version>20130603</codeartisans-json.version>
|
||||
<fasterxml-jackson.version>2.8.6</fasterxml-jackson.version>
|
||||
<dom4j.version>1.6.1</dom4j.version>
|
||||
<jaxen.version>1.1.6</jaxen.version>
|
||||
<json-lib.version>2.4</json-lib.version>
|
||||
<snakeyaml.version>1.17</snakeyaml.version>
|
||||
<esotericsoftware.kryo.version>4.0.0</esotericsoftware.kryo.version>
|
||||
<codeartisans.json.version>20130603</codeartisans.json.version>
|
||||
<dozer.version>5.5.1</dozer.version>
|
||||
<junit.version>4.12</junit.version>
|
||||
<poi.version>3.14</poi.version>
|
||||
|
||||
<!-- framework version setting -->
|
||||
<slf4j.version>1.7.25</slf4j.version>
|
||||
<logback.version>1.2.3</logback.version>
|
||||
<spring.version>4.3.13.RELEASE</spring.version>
|
||||
<aop-aspectj.version>1.7.4</aop-aspectj.version>
|
||||
<aop-cglib.version>3.1</aop-cglib.version>
|
||||
<mybatis.version>3.4.5</mybatis.version>
|
||||
<mybatis-spring.version>1.3.1</mybatis-spring.version>
|
||||
<druid.version>1.1.3</druid.version>
|
||||
<shiro.version>1.4.0</shiro.version>
|
||||
<beetl.version>2.7.11-SNAPSHOT</beetl.version>
|
||||
<ehcache.version>2.6.11</ehcache.version>
|
||||
<ehcache-web.version>2.0.4</ehcache-web.version>
|
||||
<validator.version>5.2.4.Final</validator.version>
|
||||
<jedis.version>2.9.0</jedis.version>
|
||||
<dbunit.version>2.5.2</dbunit.version>
|
||||
<quartz.version>2.2.3</quartz.version>
|
||||
|
||||
<!-- environment setting -->
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.7</java.version>
|
||||
<downloadSources>false</downloadSources>
|
||||
<downloadJavadocs>false</downloadJavadocs>
|
||||
<eclipse-plugin-download-sources>false</eclipse-plugin-download-sources>
|
||||
<eclipse-plugin-download-javadocs>false</eclipse-plugin-download-javadocs>
|
||||
|
||||
</properties>
|
||||
|
||||
@@ -64,7 +51,6 @@
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- WEB end -->
|
||||
@@ -79,10 +65,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.7.0</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<showWarnings>true</showWarnings>
|
||||
<compilerArguments>
|
||||
<!-- <verbose /> 输出有关编译器正在执行的操作的消息 -->
|
||||
@@ -95,7 +78,6 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<configuration>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
<archive>
|
||||
@@ -130,35 +112,30 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</plugin>
|
||||
|
||||
<!-- install插件 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<version>2.5.2</version>
|
||||
</plugin>
|
||||
|
||||
<!-- clean插件 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</plugin>
|
||||
|
||||
<!-- ant插件 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>1.8</version>
|
||||
</plugin>
|
||||
|
||||
<!-- dependency插件 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
@@ -171,12 +148,10 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<configuration>
|
||||
<packagingExcludes></packagingExcludes>
|
||||
<warSourceExcludes></warSourceExcludes>
|
||||
<webappDirectory>${project.build.directory}/${project.artifactId}</webappDirectory>
|
||||
<!-- <webXml>${project.basedir}/target/jspweb.xml</webXml> -->
|
||||
<warName>${project.artifactId}</warName>
|
||||
<archive>
|
||||
<addMavenDescriptor>false</addMavenDescriptor>
|
||||
@@ -188,10 +163,9 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<version>2.9</version>
|
||||
<configuration>
|
||||
<downloadSources>${downloadSources}</downloadSources>
|
||||
<downloadJavadocs>${downloadJavadocs}</downloadJavadocs>
|
||||
<downloadSources>${eclipse-plugin-download-sources}</downloadSources>
|
||||
<downloadJavadocs>${eclipse-plugin-download-javadocs}</downloadJavadocs>
|
||||
<wtpversion>2.0</wtpversion>
|
||||
<jeeversion>6.0</jeeversion>
|
||||
<additionalConfig>
|
||||
@@ -212,7 +186,6 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.10.4</version>
|
||||
<configuration>
|
||||
<aggregate>true</aggregate>
|
||||
</configuration>
|
||||
@@ -270,47 +243,6 @@
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- 这个插件的配置只用于存储Eclipse m2e设置。它没有影响Maven构建本身。 -->
|
||||
<plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<versionRange>[2.10.4,)</versionRange>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore></ignore>
|
||||
</action>
|
||||
</pluginExecution>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<versionRange>[2.10,)</versionRange>
|
||||
<goals>
|
||||
<goal>
|
||||
copy-dependencies
|
||||
</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore></ignore>
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
|
||||
</pluginManagement>
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn clean
|
||||
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn clean
|
||||
|
||||
pause
|
||||
@@ -1,21 +1,22 @@
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD>Eclipse<73><65><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn -Declipse.workspace=%cd% eclipse:clean eclipse:eclipse
|
||||
|
||||
del .classpath
|
||||
del .project
|
||||
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD>Eclipse<73><65><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn -Declipse.workspace=%cd% eclipse:clean eclipse:eclipse
|
||||
|
||||
del .classpath
|
||||
del .project
|
||||
|
||||
pause
|
||||
@@ -1,28 +1,28 @@
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>ݿ⣬<DDBF><E2A3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20>˲<EFBFBD><CBB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD>ʼ״̬<D7B4><CCAC>
|
||||
echo.
|
||||
echo [<5B><>Ϣ] ȷ<>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD>𣿷<EFBFBD><F0A3BFB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>رմ<D8B1><D5B4>ڡ<EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD>𣿷<EFBFBD><F0A3BFB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>رմ<D8B1><D5B4>ڡ<EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn test -Dtest=com.jeesite.test.InitCoreData
|
||||
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>ݿ⣬<DDBF><E2A3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20>˲<EFBFBD><CBB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD>ʼ״̬<D7B4><CCAC>
|
||||
echo.
|
||||
echo [<5B><>Ϣ] ȷ<>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD>𣿷<EFBFBD><F0A3BFB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>رմ<D8B1><D5B4>ڡ<EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD>𣿷<EFBFBD><F0A3BFB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>رմ<D8B1><D5B4>ڡ<EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn test -Dtest=com.jeesite.test.InitCoreData
|
||||
|
||||
pause
|
||||
@@ -1,18 +1,19 @@
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>war<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn clean package -Dmaven.test.skip=true -Ppackage -U
|
||||
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
echo.
|
||||
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>war<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ../
|
||||
call mvn clean package -Dmaven.test.skip=true -Ppackage -U
|
||||
|
||||
pause
|
||||
@@ -1,34 +1,34 @@
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
title %cd%
|
||||
echo.
|
||||
echo [<5B><>Ϣ] ʹ<><CAB9>Jetty<74><79><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̡<EFBFBD>
|
||||
echo.
|
||||
rem pause
|
||||
rem echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ..
|
||||
set currPath=%cd%
|
||||
|
||||
set MAVEN_OPTS=%MAVEN_OPTS% -Xms256m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m
|
||||
|
||||
if exist "../parent/pom.xml" (
|
||||
cd ../parent
|
||||
call mvn clean install -Dmaven.test.skip=true
|
||||
)
|
||||
|
||||
if exist "../modules/pom.xml" (
|
||||
cd ../modules
|
||||
call mvn clean install -Dmaven.test.skip=true
|
||||
)
|
||||
|
||||
cd %currPath%
|
||||
call mvn jetty:run -D maven.javadoc.skip=true -U
|
||||
|
||||
cd bin
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
title %cd%
|
||||
echo.
|
||||
echo [<5B><>Ϣ] ʹ<><CAB9>Jetty<74><79><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̡<EFBFBD>
|
||||
echo.
|
||||
rem pause
|
||||
rem echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ..
|
||||
set currPath=%cd%
|
||||
|
||||
set MAVEN_OPTS=%MAVEN_OPTS% -Xms256m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m
|
||||
|
||||
if exist "../parent/pom.xml" (
|
||||
cd ../parent
|
||||
call mvn clean install -Dmaven.test.skip=true
|
||||
)
|
||||
|
||||
if exist "../modules/pom.xml" (
|
||||
cd ../modules
|
||||
call mvn clean install -Dmaven.test.skip=true
|
||||
)
|
||||
|
||||
cd %currPath%
|
||||
call mvn jetty:run -D maven.javadoc.skip=true -U
|
||||
|
||||
cd bin
|
||||
pause
|
||||
@@ -1,33 +0,0 @@
|
||||
@echo off
|
||||
rem /**
|
||||
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
rem *
|
||||
rem * Author: ThinkGem@163.com
|
||||
rem */
|
||||
title %cd%
|
||||
echo.
|
||||
echo [<5B><>Ϣ] ʹ<><CAB9>Tomcat7<74><37><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̡<EFBFBD>
|
||||
echo.
|
||||
rem pause
|
||||
rem echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ..
|
||||
set currPath=%cd%
|
||||
|
||||
set MAVEN_OPTS=%MAVEN_OPTS% -Xms256m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m
|
||||
|
||||
if exist "../parent/pom.xml" (
|
||||
cd ../parent
|
||||
call mvn clean install -Dmaven.test.skip=true
|
||||
)
|
||||
|
||||
if exist "../modules/pom.xml" (
|
||||
cd ../modules
|
||||
call mvn clean install -Dmaven.test.skip=true
|
||||
)
|
||||
|
||||
cd %currPath%
|
||||
call mvn clean tomcat7:run -Dmaven.javadoc.skip=true -U
|
||||
|
||||
pause
|
||||
@@ -5,29 +5,31 @@ package com.jeesite.test;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.test.annotation.Commit;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
|
||||
/**
|
||||
* 初始化核心表数据
|
||||
* @author ThinkGem
|
||||
* @version 2017-10-22
|
||||
*/
|
||||
@ContextConfiguration(locations={"classpath*:/spring/spring-context-test.xml"})
|
||||
@Commit
|
||||
public class InitCoreData extends com.jeesite.modules.db.InitCoreData {
|
||||
|
||||
@Test
|
||||
public void initCoreData() throws Exception{
|
||||
initLog();
|
||||
initConfig();
|
||||
initModule();
|
||||
initDict();
|
||||
initRole();
|
||||
initMenu();
|
||||
initUser();
|
||||
// initConfig();
|
||||
// initModule();
|
||||
// initDict();
|
||||
// initRole();
|
||||
// initMenu();
|
||||
// initUser();
|
||||
// initArea();
|
||||
initOffice();
|
||||
initCompany();
|
||||
initPost();
|
||||
initEmpUser();
|
||||
// initOffice();
|
||||
// initCompany();
|
||||
// initPost();
|
||||
// initEmpUser();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user