42 lines
992 B
Java
42 lines
992 B
Java
package ink.wgink.properties;
|
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
/**
|
|
* @ClassName: AccessControl
|
|
* @Description: 访问控制
|
|
* @Author: WangGeng
|
|
* @Date: 2019-06-12 22:01
|
|
* @Version: 1.0
|
|
**/
|
|
@Component
|
|
@ConfigurationProperties(prefix = "access-control")
|
|
public class AccessControlProperties {
|
|
|
|
private List<String> passPaths = new ArrayList<>(0);
|
|
|
|
public List<String> getPassPaths() {
|
|
if (passPaths == null) {
|
|
return new ArrayList<>();
|
|
}
|
|
return passPaths;
|
|
}
|
|
|
|
public void setPassPaths(List<String> passPaths) {
|
|
this.passPaths = passPaths;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
final StringBuilder sb = new StringBuilder("{");
|
|
sb.append("\"passPaths\":")
|
|
.append(passPaths);
|
|
sb.append('}');
|
|
return sb.toString();
|
|
}
|
|
}
|