Former-commit-id: 732636f7502f51aee87de15ce574f14dde8ff40f
master
wangbing 5 years ago
parent 7c9e8d9d2e
commit c84a05b495

@ -49,7 +49,8 @@ public class ResourceUtil extends ResourceUtils {
ClassPathResource cpr = new ClassPathResource(resourcePath); ClassPathResource cpr = new ClassPathResource(resourcePath);
File in = cpr.getFile(); File in = cpr.getFile();
for (File file : in.listFiles()) { for (File file : in.listFiles()) {
result.add(file.getName()); String name = file.getName();
if (name.matches(".+\\..+")) result.add(name);
} }
return result; return result;
} catch (IOException e) { } catch (IOException e) {

@ -72,7 +72,7 @@ public class AuthAjax {
response.addErrors(tokensCreateResponse.getErrors()); response.addErrors(tokensCreateResponse.getErrors());
return response; return response;
} }
Cookie cookie = CookieUtil.newCookie("token", tokensCreateRequest.getToken())); Cookie cookie = CookieUtil.newCookie("token", tokensCreateRequest.getToken());
cookie.setPath("/"); cookie.setPath("/");
httpServletResponse.addCookie(cookie); httpServletResponse.addCookie(cookie);
} }
@ -124,7 +124,7 @@ public class AuthAjax {
response.addErrors(tokensCreateResponse.getErrors()); response.addErrors(tokensCreateResponse.getErrors());
return response; return response;
} }
Cookie cookie = CookieUtil.newCookie("token", tokensCreateRequest.getToken())); Cookie cookie = CookieUtil.newCookie("token", tokensCreateRequest.getToken());
cookie.setPath("/"); cookie.setPath("/");
httpServletResponse.addCookie(cookie); httpServletResponse.addCookie(cookie);
} }

@ -1,8 +1,8 @@
package ${basePackage}.frame.utils; package ${basePackage}.frame.utils;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.*; import java.util.*;
/** /**
* ClassUtil * ClassUtil

@ -19,7 +19,7 @@ public class ResourceCreateRequest extends BaseRequest {
* *
*/ */
@NotBlank(message = "[value]资源内容不能为空") @NotBlank(message = "[value]资源内容不能为空")
@Length(min = 0, max = 100, message = "资源内容长度不合法(0-100)") @Length(min = 0, max = 100, message = "[value]资源内容长度不合法(0-100)")
private String value; private String value;
/** /**
@ -31,7 +31,7 @@ public class ResourceCreateRequest extends BaseRequest {
/** /**
* *
*/ */
@NotBlank(message = "[resourceType]资源类型不能为NULL") @NotNull(message = "[resourceType]资源类型不能为NULL")
@Dict(name = "RESOURCE_TYPE") @Dict(name = "RESOURCE_TYPE")
private String resourceType; private String resourceType;
@ -41,6 +41,17 @@ public class ResourceCreateRequest extends BaseRequest {
@NotNull(message = "[valid]是否有效不能为NULL") @NotNull(message = "[valid]是否有效不能为NULL")
private Boolean valid; private Boolean valid;
/**
*
*/
@NotNull(message = "[node]是否节点不能为NULL")
private Boolean node;
/**
*
*/
private Long supId;
public String getValue() { public String getValue() {
return this.value; return this.value;
} }
@ -72,4 +83,20 @@ public class ResourceCreateRequest extends BaseRequest {
public void setValid(Boolean valid) { public void setValid(Boolean valid) {
this.valid = valid; this.valid = valid;
} }
public Boolean getNode() {
return this.node;
}
public void setNode(Boolean node) {
this.node = node;
}
public Long getSupId() {
return this.supId;
}
public void setSupId(Long supId) {
this.supId = supId;
}
} }

@ -33,6 +33,16 @@ public class ResourceFindRequest extends BaseFindRequest {
*/ */
private Boolean valid; private Boolean valid;
/**
*
*/
private Boolean node;
/**
*
*/
private Long supId;
public String getValue() { public String getValue() {
return this.value; return this.value;
} }
@ -64,4 +74,20 @@ public class ResourceFindRequest extends BaseFindRequest {
public void setValid(Boolean valid) { public void setValid(Boolean valid) {
this.valid = valid; this.valid = valid;
} }
}
public Boolean getNode() {
return this.node;
}
public void setNode(Boolean node) {
this.node = node;
}
public Long getSupId() {
return this.supId;
}
public void setSupId(Long supId) {
this.supId = supId;
}
}

@ -25,7 +25,7 @@ public class ResourceUpdateRequest extends BaseUpdateRequest {
* *
*/ */
@NotBlank(message = "[value]资源内容不能为空") @NotBlank(message = "[value]资源内容不能为空")
@Length(min = 0, max = 100, message = "资源内容长度不合法(0-100)") @Length(min = 0, max = 100, message = "[value]资源内容长度不合法(0-100)")
private String value; private String value;
/** /**
@ -47,6 +47,17 @@ public class ResourceUpdateRequest extends BaseUpdateRequest {
@NotNull(message = "[valid]是否有效不能为NULL") @NotNull(message = "[valid]是否有效不能为NULL")
private Boolean valid; private Boolean valid;
/**
*
*/
@NotNull(message = "[node]是否节点不能为NULL")
private Boolean node;
/**
*
*/
private Long supId;
public Long getId() { public Long getId() {
return this.id; return this.id;
} }
@ -86,4 +97,20 @@ public class ResourceUpdateRequest extends BaseUpdateRequest {
public void setValid(Boolean valid) { public void setValid(Boolean valid) {
this.valid = valid; this.valid = valid;
} }
public Boolean getNode() {
return this.node;
}
public void setNode(Boolean node) {
this.node = node;
}
public Long getSupId() {
return this.supId;
}
public void setSupId(Long supId) {
this.supId = supId;
}
} }

@ -2,7 +2,7 @@ package ${basePackage}.module.system.req;
import ${basePackage}.frame.base.BaseRequest; import ${basePackage}.frame.base.BaseRequest;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.Length;
import java.util.Date; import java.util.Date;
import ${basePackage}.frame.validation.Dict; import ${basePackage}.frame.validation.Dict;
@ -19,7 +19,7 @@ public class TokensCreateRequest extends BaseRequest {
/** /**
* *
*/ */
@NotEmpty(message = "[token]登录令牌不能为空") @NotBlank(message = "[token]登录令牌不能为空")
@Length(min = 0, max = 50, message = "[token]登录令牌长度不合法(0-50)") @Length(min = 0, max = 50, message = "[token]登录令牌长度不合法(0-50)")
private String token; private String token;
@ -32,7 +32,7 @@ public class TokensCreateRequest extends BaseRequest {
/** /**
* *
*/ */
@NotEmpty(message = "[userName]用户名称不能为空") @NotBlank(message = "[userName]用户名称不能为空")
@Length(min = 0, max = 50, message = "[userName]用户名称长度不合法(0-50)") @Length(min = 0, max = 50, message = "[userName]用户名称长度不合法(0-50)")
private String userName; private String userName;

@ -3,7 +3,7 @@ package ${basePackage}.module.system.req;
import ${basePackage}.frame.base.BaseUpdateRequest; import ${basePackage}.frame.base.BaseUpdateRequest;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotBlank;
import java.util.Date; import java.util.Date;
import ${basePackage}.frame.validation.Dict; import ${basePackage}.frame.validation.Dict;
@ -25,7 +25,7 @@ public class TokensUpdateRequest extends BaseUpdateRequest {
/** /**
* *
*/ */
@NotEmpty(message = "[token]登录令牌不能为空") @NotBlank(message = "[token]登录令牌不能为空")
@Length(min = 0, max = 50, message = "[token]登录令牌长度不合法(0-50)") @Length(min = 0, max = 50, message = "[token]登录令牌长度不合法(0-50)")
private String token; private String token;
@ -38,7 +38,7 @@ public class TokensUpdateRequest extends BaseUpdateRequest {
/** /**
* *
*/ */
@NotEmpty(message = "[userName]用户名称不能为空") @NotBlank(message = "[userName]用户名称不能为空")
@Length(min = 0, max = 50, message = "[userName]用户名称长度不合法(0-50)") @Length(min = 0, max = 50, message = "[userName]用户名称长度不合法(0-50)")
private String userName; private String userName;

Loading…
Cancel
Save

Powered by TurnKey Linux.