新增app登录,和注册URL

This commit is contained in:
wenc000 2020-06-03 11:22:08 +08:00
parent 14691f59b7
commit d421c08bec
2 changed files with 15 additions and 5 deletions

View File

@ -44,6 +44,7 @@ public class TransactionConfig {
NameMatchTransactionAttributeSource source = new NameMatchTransactionAttributeSource();
source.addTransactionalMethod("add*", required);
source.addTransactionalMethod("save*", required);
source.addTransactionalMethod("insert*", required);
source.addTransactionalMethod("delete*", required);
source.addTransactionalMethod("remove*", required);
@ -54,7 +55,7 @@ public class TransactionConfig {
source.addTransactionalMethod("exec*", required);
source.addTransactionalMethod("set*", required);
source.addTransactionalMethod("login", required);
source.addTransactionalMethod("login*", required);
source.addTransactionalMethod("get*", readOnly);
source.addTransactionalMethod("query*", readOnly);

View File

@ -11,7 +11,6 @@ import com.cm.common.token.app.entity.AppTokenUser;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpStatus;
import org.springframework.util.AntPathMatcher;
@ -35,9 +34,17 @@ public class AppFilter implements Filter {
private static final Logger LOG = LoggerFactory.getLogger(AppFilter.class);
private AntPathMatcher antPathMatcher;
/**
* APP登录
* APP登录用户名密码
*/
private static final String URL_LOGIN = "/**/app/sign/login";
private static final String URL_LOGIN_DEFAULT = "/**/app/sign/login";
/**
* APP登录手机验证码
*/
private static final String URL_LOGIN_PHONE = "/**/app/sign/loginphone";
/**
* APP注册
*/
private static final String URL_REGISTER = "/**/app/register/saveregisteruser";
/**
* APP下载
*/
@ -61,7 +68,9 @@ public class AppFilter implements Filter {
HttpServletRequest request = (HttpServletRequest) servletRequest;
HttpServletResponse response = (HttpServletResponse) servletResponse;
String requestUri = request.getRequestURI();
boolean matcher = antPathMatcher.match(URL_LOGIN, requestUri)
boolean matcher = antPathMatcher.match(URL_LOGIN_DEFAULT, requestUri)
|| antPathMatcher.match(URL_LOGIN_PHONE, requestUri)
|| antPathMatcher.match(URL_REGISTER, requestUri)
|| antPathMatcher.match(URL_DOWNLOAD_APP, requestUri)
|| antPathMatcher.match(URL_RELEASE_APP, requestUri)
|| antPathMatcher.match(URL_RELEASE_APP_ROUTE, requestUri);