org.zodiac.boot.config.PlatformRequestInfo Maven / Gradle / Ivy
The newest version!
package org.zodiac.boot.config;
import java.util.List;
import org.zodiac.sdk.toolkit.util.collection.CollUtil;
public class PlatformRequestInfo {
/*
* 开启自定义request。
*/
private boolean enabled = true;
/*
* 放行URL。
*/
private List skipUrl = CollUtil.list();
private final PlatformRequestXssInfo xss = new PlatformRequestXssInfo();
public PlatformRequestInfo() {
}
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public List getSkipUrl() {
return skipUrl;
}
public void setSkipUrl(List skipUrl) {
this.skipUrl = skipUrl;
}
public PlatformRequestXssInfo getXss() {
return xss;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + (enabled ? 1231 : 1237);
result = prime * result + ((skipUrl == null) ? 0 : skipUrl.hashCode());
result = prime * result + ((xss == null) ? 0 : xss.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
PlatformRequestInfo other = (PlatformRequestInfo)obj;
if (enabled != other.enabled)
return false;
if (skipUrl == null) {
if (other.skipUrl != null)
return false;
} else if (!skipUrl.equals(other.skipUrl))
return false;
if (xss == null) {
if (other.xss != null)
return false;
} else if (!xss.equals(other.xss))
return false;
return true;
}
@Override
public String toString() {
return "PlatformRequestInfo [enabled=" + enabled + ", skipUrl=" + skipUrl + ", xss=" + xss + "]";
}
}