pom优化,继承spring-boot-starter-parent;bat优化

This commit is contained in:
thinkgem
2018-01-08 23:03:16 +08:00
parent d08b54893c
commit 329db53a8f
22 changed files with 483 additions and 593 deletions

View File

@@ -1,18 +1,19 @@
@echo off @echo off
rem /** rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved. rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem * rem *
rem * Author: ThinkGem@163.com rem * Author: ThinkGem@163.com
rem */ rem */
echo. echo.
echo [<5B><>Ϣ] <20><><EFBFBD>𹤳̰汾<CCB0><E6B1BE>Nexus<75><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> echo [<5B><>Ϣ] <20><><EFBFBD>𹤳̰汾<CCB0><E6B1BE>Nexus<75><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
echo. echo.
pause pause
echo. echo.
cd %~dp0 %~d0
cd %~dp0
cd ../
call mvn clean deploy -Dmaven.test.skip=true -Pdeploy cd ../
call mvn clean deploy -Dmaven.test.skip=true -Pdeploy
pause pause

View File

@@ -1,18 +1,19 @@
@echo off @echo off
rem /** rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved. rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem * rem *
rem * Author: ThinkGem@163.com rem * Author: ThinkGem@163.com
rem */ rem */
echo. echo.
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EBB9A4>Javadoc<6F><63><EFBFBD><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD> echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EBB9A4>Javadoc<6F><63><EFBFBD><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
echo. echo.
pause pause
echo. echo.
cd %~dp0 %~d0
cd %~dp0
cd ../
call mvn clean javadoc:jar cd ../
call mvn clean javadoc:jar
pause pause

View File

@@ -1,18 +1,19 @@
@echo off @echo off
rem /** rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved. rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem * rem *
rem * Author: ThinkGem@163.com rem * Author: ThinkGem@163.com
rem */ rem */
echo. echo.
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD> echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
echo. echo.
pause pause
echo. echo.
cd %~dp0 %~d0
cd %~dp0
cd ../
call mvn clean install -Dmaven.test.skip=true -Ppackage cd ../
call mvn clean install -Dmaven.test.skip=true -Ppackage
pause pause

View File

@@ -37,7 +37,6 @@
<dependency> <dependency>
<groupId>commons-codec</groupId> <groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId> <artifactId>commons-codec</artifactId>
<version>${commons-codec.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-fileupload</groupId> <groupId>commons-fileupload</groupId>
@@ -47,59 +46,52 @@
<dependency> <dependency>
<groupId>commons-beanutils</groupId> <groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId> <artifactId>commons-beanutils</artifactId>
<version>${commons-beanutils.version}</version>
</dependency> </dependency>
<!-- Java serialization --> <!-- Java serialization -->
<dependency> <dependency>
<groupId>com.esotericsoftware</groupId> <groupId>com.esotericsoftware</groupId>
<artifactId>kryo</artifactId> <artifactId>kryo</artifactId>
<version>${esotericsoftware-kryo.version}</version> <version>${esotericsoftware.kryo.version}</version>
</dependency> </dependency>
<!-- Org json --> <!-- Org json -->
<dependency> <dependency>
<groupId>org.codeartisans</groupId> <groupId>org.codeartisans</groupId>
<artifactId>org.json</artifactId> <artifactId>org.json</artifactId>
<version>${codeartisans-json.version}</version> <version>${codeartisans.json.version}</version>
</dependency> </dependency>
<!-- Jackson json --> <!-- Jackson json -->
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId> <artifactId>jackson-core</artifactId>
<version>${fasterxml-jackson.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId> <artifactId>jackson-databind</artifactId>
<version>${fasterxml-jackson.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId> <groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId> <artifactId>jackson-dataformat-xml</artifactId>
<version>${fasterxml-jackson.version}</version>
</dependency> </dependency>
<!-- Java xml --> <!-- Java xml -->
<dependency> <dependency>
<groupId>dom4j</groupId> <groupId>dom4j</groupId>
<artifactId>dom4j</artifactId> <artifactId>dom4j</artifactId>
<version>${dom4j.version}</version>
</dependency> </dependency>
<!-- XPath xml --> <!-- XPath xml -->
<dependency> <dependency>
<groupId>jaxen</groupId> <groupId>jaxen</groupId>
<artifactId>jaxen</artifactId> <artifactId>jaxen</artifactId>
<version>${jaxen.version}</version>
</dependency> </dependency>
<!-- Snake YAML --> <!-- Snake YAML -->
<dependency> <dependency>
<groupId>org.yaml</groupId> <groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId> <artifactId>snakeyaml</artifactId>
<version>${snakeyaml.version}</version>
</dependency> </dependency>
<!-- Bean To Bean copy --> <!-- Bean To Bean copy -->
@@ -172,13 +164,7 @@
<dependency> <dependency>
<groupId>org.apache.httpcomponents</groupId> <groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId> <artifactId>httpclient</artifactId>
<version>4.5.3</version>
</dependency> </dependency>
<!-- <dependency>
<groupId>sun-jaxws</groupId>
<artifactId>sjsxp</artifactId>
<version>2.1.1</version>
</dependency> -->
<!-- Jsoup HTTP --> <!-- Jsoup HTTP -->
<dependency> <dependency>
@@ -242,31 +228,26 @@
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId> <artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency> </dependency>
<!-- common-logging 实际调用 slf4j --> <!-- common-logging 实际调用 slf4j -->
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId> <artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency> </dependency>
<!-- jdk logging 实际调用 slf4j --> <!-- jdk logging 实际调用 slf4j -->
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId> <artifactId>jul-to-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency> </dependency>
<!-- log4j 实际调用 slf4j --> <!-- log4j 实际调用 slf4j -->
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId> <artifactId>log4j-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency> </dependency>
<!-- slf4j logback 实现 --> <!-- slf4j logback 实现 -->
<dependency> <dependency>
<groupId>ch.qos.logback</groupId> <groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId> <artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency> </dependency>
<!-- LOGGING end --> <!-- LOGGING end -->
@@ -274,31 +255,26 @@
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId> <artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId> <artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency> </dependency>
<!-- Bean validate --> <!-- Bean validate -->
<dependency> <dependency>
<groupId>org.hibernate</groupId> <groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId> <artifactId>hibernate-validator</artifactId>
<version>${validator.version}</version>
</dependency> </dependency>
<!-- JUnit Test --> <!-- JUnit Test -->
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId> <artifactId>spring-test</artifactId>
<version>${spring.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@@ -1,18 +1,19 @@
@echo off @echo off
rem /** rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved. rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem * rem *
rem * Author: ThinkGem@163.com rem * Author: ThinkGem@163.com
rem */ rem */
echo. echo.
echo [<5B><>Ϣ] <20><><EFBFBD>𹤳̰汾<CCB0><E6B1BE>Nexus<75><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> echo [<5B><>Ϣ] <20><><EFBFBD>𹤳̰汾<CCB0><E6B1BE>Nexus<75><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
echo. echo.
pause pause
echo. echo.
cd %~dp0 %~d0
cd %~dp0
cd ../
call mvn clean deploy -Dmaven.test.skip=true -Pdeploy cd ../
call mvn clean deploy -Dmaven.test.skip=true -Pdeploy
pause pause

View File

@@ -1,18 +1,19 @@
@echo off @echo off
rem /** rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved. rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem * rem *
rem * Author: ThinkGem@163.com rem * Author: ThinkGem@163.com
rem */ rem */
echo. echo.
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EBB9A4>Javadoc<6F><63><EFBFBD><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD> echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EBB9A4>Javadoc<6F><63><EFBFBD><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
echo. echo.
pause pause
echo. echo.
cd %~dp0 %~d0
cd %~dp0
cd ../
call mvn clean javadoc:jar cd ../
call mvn clean javadoc:jar
pause pause

View File

@@ -1,18 +1,19 @@
@echo off @echo off
rem /** rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved. rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem * rem *
rem * Author: ThinkGem@163.com rem * Author: ThinkGem@163.com
rem */ rem */
echo. echo.
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD> echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
echo. echo.
pause pause
echo. echo.
cd %~dp0 %~d0
cd %~dp0
cd ../
call mvn clean install -Dmaven.test.skip=true -Ppackage cd ../
call mvn clean install -Dmaven.test.skip=true -Ppackage
pause pause

View File

@@ -1,71 +1,72 @@
/** /**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved. * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/ */
package com.jeesite.common.shiro.filter; package com.jeesite.common.shiro.filter;
import javax.servlet.ServletRequest; import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse; import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.session.SessionException; import org.apache.shiro.session.SessionException;
import org.apache.shiro.subject.Subject; import org.apache.shiro.subject.Subject;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import com.jeesite.common.config.Global; import com.jeesite.common.config.Global;
import com.jeesite.common.web.http.ServletUtils; import com.jeesite.common.web.http.ServletUtils;
import com.jeesite.modules.sys.utils.LogUtils; import com.jeesite.modules.sys.utils.LogUtils;
/** /**
* 登出过滤器 * 登出过滤器
* @author ThinkGem * @author ThinkGem
* @version 2017-03-22 * @version 2017-03-22
*/ */
public class LogoutFilter extends org.apache.shiro.web.filter.authc.LogoutFilter { public class LogoutFilter extends org.apache.shiro.web.filter.authc.LogoutFilter {
private static final Logger log = LoggerFactory.getLogger(LogoutFilter.class); private static final Logger log = LoggerFactory.getLogger(LogoutFilter.class);
@Override @Override
protected boolean preHandle(ServletRequest request, ServletResponse response) throws Exception { protected boolean preHandle(ServletRequest request, ServletResponse response) throws Exception {
try{ return super.preHandle(request, response);
Subject subject = getSubject(request, response); // try{
String redirectUrl = getRedirectUrl(request, response, subject); // Subject subject = getSubject(request, response);
//try/catch added for SHIRO-298: // String redirectUrl = getRedirectUrl(request, response, subject);
try { // //try/catch added for SHIRO-298:
// 记录用户退出日志 // try {
LogUtils.saveLog(ServletUtils.getRequest(), "系统退出"); // // 记录用户退出日志
// 退出登录 // LogUtils.saveLog(ServletUtils.getRequest(), "系统退出");
subject.logout(); // // 退出登录
} catch (SessionException ise) { // subject.logout();
log.debug("Encountered session exception during logout. This can generally safely be ignored.", ise); // } catch (SessionException ise) {
} // log.debug("Encountered session exception during logout. This can generally safely be ignored.", ise);
// }
// 如果是Ajax请求返回Json字符串。 //
if (ServletUtils.isAjaxRequest((HttpServletRequest)request)){ // // 如果是Ajax请求返回Json字符串。
ServletUtils.renderResult((HttpServletResponse)response, Global.TRUE, "退出成功!"); // if (ServletUtils.isAjaxRequest((HttpServletRequest)request)){
return false; // ServletUtils.renderResult((HttpServletResponse)response, Global.TRUE, "退出成功!");
} // return false;
// }
issueRedirect(request, response, redirectUrl); //
}catch(Exception e){ // issueRedirect(request, response, redirectUrl);
log.debug("Encountered session exception during logout. This can generally safely be ignored.", e); // }catch(Exception e){
} // log.debug("Encountered session exception during logout. This can generally safely be ignored.", e);
return false; // }
} // return false;
}
/**
* 登出跳转URL /**
*/ * 登出跳转URL
@Override */
protected String getRedirectUrl(ServletRequest request, ServletResponse response, Subject subject) { @Override
String url = Global.getProperty("shiro.logoutUrl"); protected String getRedirectUrl(ServletRequest request, ServletResponse response, Subject subject) {
// 如果配置了登出之后跳转的url并且url不能为 ${adminPath}/logout 否则会造成死循环。 return super.getRedirectUrl(request, response, subject);
if (StringUtils.isNoneBlank(url) && !url.equals((Global.getAdminPath()+"/logout"))){ // String url = Global.getProperty("shiro.logoutUrl");
return url; // // 如果配置了登出之后跳转的url并且url不能为 ${adminPath}/logout 否则会造成死循环。
} // if (StringUtils.isNoneBlank(url) && !url.equals((Global.getAdminPath()+"/logout"))){
return super.getRedirectUrl(request, response, subject); // return url;
} // }
}
}
}

View File

@@ -1,81 +1,81 @@
/** /**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved. * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/ */
package com.jeesite.common.shiro.filter; package com.jeesite.common.shiro.filter;
import java.io.IOException; import java.io.IOException;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import javax.servlet.ServletRequest; import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse; import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.UnauthorizedException; import org.apache.shiro.authz.UnauthorizedException;
import org.apache.shiro.subject.Subject; import org.apache.shiro.subject.Subject;
import org.apache.shiro.web.util.WebUtils; import org.apache.shiro.web.util.WebUtils;
import com.jeesite.common.config.Global; import com.jeesite.common.config.Global;
import com.jeesite.common.web.http.ServletUtils; import com.jeesite.common.web.http.ServletUtils;
import com.jeesite.common.web.http.wrapper.GetHttpServletRequestWrapper; import com.jeesite.common.web.http.wrapper.GetHttpServletRequestWrapper;
/** /**
* 权限字符串过滤器 * 权限字符串过滤器
* @author ThinkGem * @author ThinkGem
* @version 2017-03-22 * @version 2017-03-22
*/ */
public class PermissionsAuthorizationFilter extends org.apache.shiro.web.filter.authz.PermissionsAuthorizationFilter { public class PermissionsAuthorizationFilter extends org.apache.shiro.web.filter.authz.PermissionsAuthorizationFilter {
@Override @Override
protected void redirectToLogin(ServletRequest request, ServletResponse response) throws IOException { protected void redirectToLogin(ServletRequest request, ServletResponse response) throws IOException {
PermissionsAuthorizationFilter.redirectToDefaultPath(request, response); PermissionsAuthorizationFilter.redirectToDefaultPath(request, response);
} }
@Override @Override
protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws IOException { protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws IOException {
return PermissionsAuthorizationFilter.redirectTo403Page(request, response); return PermissionsAuthorizationFilter.redirectTo403Page(request, response);
} }
/** /**
* 无访问权限时跳转到403页面 * 无访问权限时跳转到403页面
* @param request * @param request
* @param response * @param response
* @return * @return
* @throws IOException * @throws IOException
* @author ThinkGem * @author ThinkGem
*/ */
public static boolean redirectTo403Page(ServletRequest request, ServletResponse response) throws IOException { public static boolean redirectTo403Page(ServletRequest request, ServletResponse response) throws IOException {
Subject subject = SecurityUtils.getSubject(); Subject subject = SecurityUtils.getSubject();
// If the subject isn't identified, redirect to login URL // If the subject isn't identified, redirect to login URL
if (subject.getPrincipal() == null) { if (subject.getPrincipal() == null) {
redirectToDefaultPath(request, response); redirectToDefaultPath(request, response);
} else { } else {
try { try {
// 如果访问的是未授权页面则直接转到403页面2016-11-3 // 如果访问的是未授权页面则直接转到403页面2016-11-3
request.getRequestDispatcher("/error/403").forward(request, response); request.getRequestDispatcher("/error/403").forward(request, response);
} catch (ServletException e) { } catch (ServletException e) {
throw new UnauthorizedException(e); throw new UnauthorizedException(e);
} }
} }
return false; return false;
} }
/** /**
* 跳转登录页时,跳转到默认首页 * 跳转登录页时,跳转到默认首页
*/ */
public static void redirectToDefaultPath(ServletRequest request, ServletResponse response) throws IOException { public static void redirectToDefaultPath(ServletRequest request, ServletResponse response) throws IOException {
// AJAX不支持Redirect改用Forward // AJAX不支持Redirect改用Forward
String loginUrl = Global.getProperty("defaultPath"); String loginUrl = Global.getProperty("defaultPath");
if (ServletUtils.isAjaxRequest((HttpServletRequest) request)) { if (ServletUtils.isAjaxRequest((HttpServletRequest) request)) {
try { try {
request.getRequestDispatcher(loginUrl).forward( request.getRequestDispatcher(loginUrl).forward(
new GetHttpServletRequestWrapper(request), response); new GetHttpServletRequestWrapper(request), response);
} catch (ServletException e) { } catch (ServletException e) {
e.printStackTrace(); e.printStackTrace();
} }
}else{ }else{
WebUtils.issueRedirect(request, response, loginUrl); WebUtils.issueRedirect(request, response, loginUrl);
} }
} }
} }

View File

@@ -1,28 +1,30 @@
/** /**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved. * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/ */
package com.jeesite.common.shiro.filter; package com.jeesite.common.shiro.filter;
import java.io.IOException; import java.io.IOException;
import javax.servlet.ServletRequest; import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse; import javax.servlet.ServletResponse;
/** /**
* 角色权限过滤器 * 角色权限过滤器
* @author ThinkGem * @author ThinkGem
* @version 2017-03-22 * @version 2017-03-22
*/ */
public class RolesAuthorizationFilter extends org.apache.shiro.web.filter.authz.RolesAuthorizationFilter { public class RolesAuthorizationFilter extends org.apache.shiro.web.filter.authz.RolesAuthorizationFilter {
@Override @Override
protected void redirectToLogin(ServletRequest request, ServletResponse response) throws IOException { protected void redirectToLogin(ServletRequest request, ServletResponse response) throws IOException {
PermissionsAuthorizationFilter.redirectToDefaultPath(request, response); super.redirectToLogin(request, response);
} // PermissionsAuthorizationFilter.redirectToDefaultPath(request, response);
}
@Override
protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws IOException { @Override
return PermissionsAuthorizationFilter.redirectTo403Page(request, response); protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws IOException {
} return super.onAccessDenied(request, response);
// return PermissionsAuthorizationFilter.redirectTo403Page(request, response);
} }
}

View File

@@ -49,7 +49,6 @@ import com.jeesite.modules.sys.service.UserService;
* @author ThinkGem * @author ThinkGem
* @version 2017-10-22 * @version 2017-10-22
*/ */
//@Commit
public class InitCoreData extends BaseInitDataTests { public class InitCoreData extends BaseInitDataTests {
@Override @Override

View File

@@ -48,12 +48,12 @@ public class LoginController extends BaseController{
*/ */
@RequestMapping(value = "login", method = RequestMethod.GET) @RequestMapping(value = "login", method = RequestMethod.GET)
public String login(HttpServletRequest request, HttpServletResponse response, Model model) { public String login(HttpServletRequest request, HttpServletResponse response, Model model) {
// // 地址中如果包含JSESSIONID则跳转一次去掉JSESSIONID信息。 // 地址中如果包含JSESSIONID则跳转一次去掉JSESSIONID信息。
// if (StringUtils.containsIgnoreCase(request.getRequestURI(), ";JSESSIONID=")){ if (StringUtils.containsIgnoreCase(request.getRequestURI(), ";JSESSIONID=")){
// String queryString = request.getQueryString(); String queryString = request.getQueryString();
// queryString = queryString == null ? "" : "?" + queryString; queryString = queryString == null ? "" : "?" + queryString;
// return REDIRECT + adminPath + "/login" + queryString; return REDIRECT + adminPath + "/login" + queryString;
// } }
LoginInfo loginInfo = UserUtils.getLoginInfo(); LoginInfo loginInfo = UserUtils.getLoginInfo();
@@ -196,12 +196,12 @@ public class LoginController extends BaseController{
*/ */
@RequestMapping(value = "index") @RequestMapping(value = "index")
public String index(HttpServletRequest request, HttpServletResponse response, Model model) { public String index(HttpServletRequest request, HttpServletResponse response, Model model) {
// // 地址中如果包含JSESSIONID则跳转一次去掉JSESSIONID信息。 // 地址中如果包含JSESSIONID则跳转一次去掉JSESSIONID信息。
// if (StringUtils.containsIgnoreCase(request.getRequestURI(), ";JSESSIONID=")){ if (StringUtils.containsIgnoreCase(request.getRequestURI(), ";JSESSIONID=")){
// String queryString = request.getQueryString(); String queryString = request.getQueryString();
// queryString = queryString == null ? "" : "?" + queryString; queryString = queryString == null ? "" : "?" + queryString;
// return REDIRECT + adminPath + "/index" + queryString; return REDIRECT + adminPath + "/index" + queryString;
// } }
// 验证下用户权限以便调用doGetAuthorizationInfo方法保存单点登录登出句柄 // 验证下用户权限以便调用doGetAuthorizationInfo方法保存单点登录登出句柄
if (!SecurityUtils.getSubject().isPermitted("user")){ if (!SecurityUtils.getSubject().isPermitted("user")){

View File

@@ -1,18 +1,19 @@
@echo off @echo off
rem /** rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved. rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem * rem *
rem * Author: ThinkGem@163.com rem * Author: ThinkGem@163.com
rem */ rem */
echo. echo.
echo [<5B><>Ϣ] <20><><EFBFBD>𹤳̰汾<CCB0><E6B1BE>Nexus<75><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> echo [<5B><>Ϣ] <20><><EFBFBD>𹤳̰汾<CCB0><E6B1BE>Nexus<75><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
echo. echo.
pause pause
echo. echo.
cd %~dp0 %~d0
cd %~dp0
cd ../
call mvn clean deploy -Dmaven.test.skip=true -Pdeploy cd ../
call mvn clean deploy -Dmaven.test.skip=true -Pdeploy
pause pause

View File

@@ -1,18 +1,19 @@
@echo off @echo off
rem /** rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved. rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem * rem *
rem * Author: ThinkGem@163.com rem * Author: ThinkGem@163.com
rem */ rem */
echo. echo.
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD> echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
echo. echo.
pause pause
echo. echo.
cd %~dp0 %~d0
cd %~dp0
cd ../
call mvn clean install -Dmaven.test.skip=true -Ppackage cd ../
call mvn clean install -Dmaven.test.skip=true -Ppackage
pause pause

View File

@@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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"> 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> <modelVersion>4.0.0</modelVersion>
<groupId>com.jeesite</groupId> <groupId>com.jeesite</groupId>
<artifactId>jeesite-parent</artifactId> <artifactId>jeesite-parent</artifactId>
<version>4.0-SNAPSHOT</version> <version>4.0-SNAPSHOT</version>
@@ -12,49 +12,36 @@
<url>http://jeesite.com</url> <url>http://jeesite.com</url>
<inceptionYear>2013-Now</inceptionYear> <inceptionYear>2013-Now</inceptionYear>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.9.RELEASE</version>
</parent>
<properties> <properties>
<!-- common version setting --> <!-- common version setting -->
<commons-lang3.version>3.4</commons-lang3.version> <commons-lang3.version>3.4</commons-lang3.version>
<commons-io.version>2.5</commons-io.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-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>
<esotericsoftware-kryo.version>4.0.0</esotericsoftware-kryo.version> <codeartisans.json.version>20130603</codeartisans.json.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>
<dozer.version>5.5.1</dozer.version> <dozer.version>5.5.1</dozer.version>
<junit.version>4.12</junit.version>
<poi.version>3.14</poi.version> <poi.version>3.14</poi.version>
<!-- framework version setting --> <!-- 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.version>3.4.5</mybatis.version>
<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.11-SNAPSHOT</beetl.version>
<ehcache.version>2.6.11</ehcache.version>
<ehcache-web.version>2.0.4</ehcache-web.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> <quartz.version>2.2.3</quartz.version>
<!-- environment setting --> <!-- environment setting -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.7</java.version> <java.version>1.7</java.version>
<downloadSources>false</downloadSources> <eclipse-plugin-download-sources>false</eclipse-plugin-download-sources>
<downloadJavadocs>false</downloadJavadocs> <eclipse-plugin-download-javadocs>false</eclipse-plugin-download-javadocs>
</properties> </properties>
@@ -64,7 +51,6 @@
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId> <artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- WEB end --> <!-- WEB end -->
@@ -79,10 +65,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration> <configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<showWarnings>true</showWarnings> <showWarnings>true</showWarnings>
<compilerArguments> <compilerArguments>
<!-- <verbose /> 输出有关编译器正在执行的操作的消息 --> <!-- <verbose /> 输出有关编译器正在执行的操作的消息 -->
@@ -95,7 +78,6 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration> <configuration>
<encoding>${project.build.sourceEncoding}</encoding> <encoding>${project.build.sourceEncoding}</encoding>
<archive> <archive>
@@ -130,35 +112,30 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId> <artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin> </plugin>
<!-- install插件 --> <!-- install插件 -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId> <artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin> </plugin>
<!-- clean插件 --> <!-- clean插件 -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId> <artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
</plugin> </plugin>
<!-- ant插件 --> <!-- ant插件 -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
</plugin> </plugin>
<!-- dependency插件 --> <!-- dependency插件 -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId> <artifactId>maven-dependency-plugin</artifactId>
<version>3.0.2</version>
</plugin> </plugin>
</plugins> </plugins>
@@ -171,12 +148,10 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId> <artifactId>maven-war-plugin</artifactId>
<version>3.0.0</version>
<configuration> <configuration>
<packagingExcludes></packagingExcludes> <packagingExcludes></packagingExcludes>
<warSourceExcludes></warSourceExcludes> <warSourceExcludes></warSourceExcludes>
<webappDirectory>${project.build.directory}/${project.artifactId}</webappDirectory> <webappDirectory>${project.build.directory}/${project.artifactId}</webappDirectory>
<!-- <webXml>${project.basedir}/target/jspweb.xml</webXml> -->
<warName>${project.artifactId}</warName> <warName>${project.artifactId}</warName>
<archive> <archive>
<addMavenDescriptor>false</addMavenDescriptor> <addMavenDescriptor>false</addMavenDescriptor>
@@ -188,10 +163,9 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId> <artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration> <configuration>
<downloadSources>${downloadSources}</downloadSources> <downloadSources>${eclipse-plugin-download-sources}</downloadSources>
<downloadJavadocs>${downloadJavadocs}</downloadJavadocs> <downloadJavadocs>${eclipse-plugin-download-javadocs}</downloadJavadocs>
<wtpversion>2.0</wtpversion> <wtpversion>2.0</wtpversion>
<jeeversion>6.0</jeeversion> <jeeversion>6.0</jeeversion>
<additionalConfig> <additionalConfig>
@@ -212,7 +186,6 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<configuration> <configuration>
<aggregate>true</aggregate> <aggregate>true</aggregate>
</configuration> </configuration>
@@ -270,47 +243,6 @@
</configuration> </configuration>
</plugin> </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> </plugins>
</pluginManagement> </pluginManagement>

View File

@@ -1,18 +1,19 @@
@echo off @echo off
rem /** rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved. rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem * rem *
rem * Author: ThinkGem@163.com rem * Author: ThinkGem@163.com
rem */ rem */
echo. echo.
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD> echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD>
echo. echo.
pause pause
echo. echo.
cd %~dp0 %~d0
cd %~dp0
cd ../
call mvn clean cd ../
call mvn clean
pause pause

View File

@@ -1,21 +1,22 @@
@echo off @echo off
rem /** rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved. rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem * rem *
rem * Author: ThinkGem@163.com rem * Author: ThinkGem@163.com
rem */ rem */
echo. echo.
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD>Eclipse<73><65><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD> echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD>Eclipse<73><65><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
echo. echo.
pause pause
echo. echo.
cd %~dp0 %~d0
cd %~dp0
cd ../
call mvn -Declipse.workspace=%cd% eclipse:clean eclipse:eclipse cd ../
call mvn -Declipse.workspace=%cd% eclipse:clean eclipse:eclipse
del .classpath
del .project del .classpath
del .project
pause pause

View File

@@ -1,28 +1,28 @@
@echo off @echo off
rem /** rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved. rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem * rem *
rem * Author: ThinkGem@163.com rem * Author: ThinkGem@163.com
rem */ rem */
echo. echo.
echo [<5B><>Ϣ] <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>ݿ⣬<DDBF><E2A3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> echo [<5B><>Ϣ] <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>ݿ⣬<DDBF><E2A3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
echo. echo.
pause pause
echo. 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 [<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.
echo [<5B><>Ϣ] ȷ<>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD>𣿷<EFBFBD><F0A3BFB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>رմ<D8B1><D5B4>ڡ<EFBFBD> echo [<5B><>Ϣ] ȷ<>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD>𣿷<EFBFBD><F0A3BFB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>رմ<D8B1><D5B4>ڡ<EFBFBD>
echo. echo.
pause pause
echo. echo.
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD>𣿷<EFBFBD><F0A3BFB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>رմ<D8B1><D5B4>ڡ<EFBFBD> echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD>𣿷<EFBFBD><F0A3BFB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>رմ<D8B1><D5B4>ڡ<EFBFBD>
echo. echo.
pause pause
echo. echo.
cd %~dp0 cd %~dp0
cd ../ cd ../
call mvn test -Dtest=com.jeesite.test.InitCoreData call mvn test -Dtest=com.jeesite.test.InitCoreData
pause pause

View File

@@ -1,18 +1,19 @@
@echo off @echo off
rem /** rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved. rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem * rem *
rem * Author: ThinkGem@163.com rem * Author: ThinkGem@163.com
rem */ rem */
echo. echo.
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>war<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD> echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>war<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
echo. echo.
pause pause
echo. echo.
cd %~dp0 %~d0
cd %~dp0
cd ../
call mvn clean package -Dmaven.test.skip=true -Ppackage -U cd ../
call mvn clean package -Dmaven.test.skip=true -Ppackage -U
pause pause

View File

@@ -1,34 +1,34 @@
@echo off @echo off
rem /** rem /**
rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved. rem * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
rem * rem *
rem * Author: ThinkGem@163.com rem * Author: ThinkGem@163.com
rem */ rem */
title %cd% title %cd%
echo. echo.
echo [<5B><>Ϣ] ʹ<><CAB9>Jetty<74><79><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̡<EFBFBD> echo [<5B><>Ϣ] ʹ<><CAB9>Jetty<74><79><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̡<EFBFBD>
echo. echo.
rem pause rem pause
rem echo. rem echo.
cd %~dp0 cd %~dp0
cd .. cd ..
set currPath=%cd% set currPath=%cd%
set MAVEN_OPTS=%MAVEN_OPTS% -Xms256m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m set MAVEN_OPTS=%MAVEN_OPTS% -Xms256m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m
if exist "../parent/pom.xml" ( if exist "../parent/pom.xml" (
cd ../parent cd ../parent
call mvn clean install -Dmaven.test.skip=true call mvn clean install -Dmaven.test.skip=true
) )
if exist "../modules/pom.xml" ( if exist "../modules/pom.xml" (
cd ../modules cd ../modules
call mvn clean install -Dmaven.test.skip=true call mvn clean install -Dmaven.test.skip=true
) )
cd %currPath% cd %currPath%
call mvn jetty:run -D maven.javadoc.skip=true -U call mvn jetty:run -D maven.javadoc.skip=true -U
cd bin cd bin
pause pause

View File

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

View File

@@ -5,29 +5,31 @@ package com.jeesite.test;
import org.junit.Test; import org.junit.Test;
import org.springframework.test.annotation.Commit; import org.springframework.test.annotation.Commit;
import org.springframework.test.context.ContextConfiguration;
/** /**
* 初始化核心表数据 * 初始化核心表数据
* @author ThinkGem * @author ThinkGem
* @version 2017-10-22 * @version 2017-10-22
*/ */
@ContextConfiguration(locations={"classpath*:/spring/spring-context-test.xml"})
@Commit @Commit
public class InitCoreData extends com.jeesite.modules.db.InitCoreData { public class InitCoreData extends com.jeesite.modules.db.InitCoreData {
@Test @Test
public void initCoreData() throws Exception{ public void initCoreData() throws Exception{
initLog(); initLog();
initConfig(); // initConfig();
initModule(); // initModule();
initDict(); // initDict();
initRole(); // initRole();
initMenu(); // initMenu();
initUser(); // initUser();
// initArea(); // initArea();
initOffice(); // initOffice();
initCompany(); // initCompany();
initPost(); // initPost();
initEmpUser(); // initEmpUser();
} }
} }