|
|
|
@ -166,7 +166,7 @@ public interface FileService {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
default FileService setPrefix(String prefix) {
|
|
|
|
default FileService setPrefix(String prefix) {
|
|
|
|
if (StrUtil.isBlank(prefix)) {
|
|
|
|
if (StrUtil.isBlank(prefix)) {
|
|
|
|
throw new RuntimeException("路径前缀不能为空");
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!prefix.matches("^[\\w\\-]+$")) {
|
|
|
|
if (!prefix.matches("^[\\w\\-]+$")) {
|
|
|
|
throw new RuntimeException("路径前缀规则错误");
|
|
|
|
throw new RuntimeException("路径前缀规则错误");
|
|
|
|
|