浏览代码

精简依赖

zhou-hao 6 年之前
父节点
当前提交
1859f9b2e1

+ 0 - 1
hsweb-boost/hsweb-boost-validator/hsweb-boost-validator-api/README.md

@@ -1 +0,0 @@
-# 验证器增强。提供重复数据验证等api

+ 0 - 39
hsweb-boost/hsweb-boost-validator/hsweb-boost-validator-api/pom.xml

@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~  Copyright 2016 http://www.hswebframework.org
-  ~
-  ~  Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~  You may obtain a copy of the License at
-  ~
-  ~        http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~  Unless required by applicable law or agreed to in writing, software
-  ~  distributed under the License is distributed on an "AS IS" BASIS,
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~  See the License for the specific language governing permissions and
-  ~  limitations under the License.
-  ~
-  ~
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-boost-validator</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-boost-validator-api</artifactId>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-boost-aop</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-</project>

+ 0 - 64
hsweb-boost/hsweb-boost-validator/hsweb-boost-validator-api/src/main/java/org/hswebframework/web/boost/validator/DuplicateValidator.java

@@ -1,64 +0,0 @@
-/*
- *  Copyright 2016 http://www.hswebframework.org
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-
-package org.hswebframework.web.boost.validator;
-
-import org.hswebframework.web.boost.aop.context.MethodInterceptorContext;
-
-/**
- * 重复数据验证器,验证数据是否重复
- *
- * @author zhouhao
- */
-public interface DuplicateValidator {
-    Result doValidate(DuplicateValidatorConfig validator, MethodInterceptorContext context);
-
-    /**
-     * 验证结果
-     */
-    class Result {
-        //是否存在重复的数据
-        boolean exists;
-        //存在的数据,不存在时值为null
-        Object  data;
-
-        public Result() {
-        }
-
-        public Result(boolean exists, Object data) {
-            this.exists = exists;
-            this.data = data;
-        }
-
-        public boolean isExists() {
-            return exists;
-        }
-
-        public void setExists(boolean exists) {
-            this.exists = exists;
-        }
-
-        public Object getData() {
-            return data;
-        }
-
-        public void setData(Object data) {
-            this.data = data;
-        }
-    }
-}

+ 0 - 54
hsweb-boost/hsweb-boost-validator/hsweb-boost-validator-api/src/main/java/org/hswebframework/web/boost/validator/DuplicateValidatorConfig.java

@@ -1,54 +0,0 @@
-/*
- *  Copyright 2016 http://www.hswebframework.org
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-
-package org.hswebframework.web.boost.validator;
-
-
-import java.io.Serializable;
-
-/**
- * 重复数据验证配置
- *
- * @author zhouhao
- */
-public interface DuplicateValidatorConfig extends Serializable {
-    /**
-     * 对数据的操作事件
-     *
-     * @return 操作事件
-     * @see org.hswebframework.web.authorization.Permission#ACTION_UPDATE
-     * @see org.hswebframework.web.authorization.Permission#ACTION_ADD
-     */
-    String getAction();
-
-    /**
-     * @return 验证未通过时返回的消息
-     */
-    String getErrorMessage();
-
-    /**
-     * @return 验证方式
-     */
-    String getType();
-
-    interface DefaultType {
-        String SCRIPT = "SCRIPT";
-        String FIELDS = "FIELDS";
-        String CUSTOM = "CUSTOM";
-    }
-}

+ 0 - 36
hsweb-boost/hsweb-boost-validator/hsweb-boost-validator-api/src/main/java/org/hswebframework/web/boost/validator/FiledDuplicateValidatorConfig.java

@@ -1,36 +0,0 @@
-/*
- *  Copyright 2016 http://www.hswebframework.org
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-
-package org.hswebframework.web.boost.validator;
-
-import java.util.List;
-
-/**
- * 根据字段判断是否存在重复的数据
- *
- * @author zhouhao
- * @since 3.0
- */
-public interface FiledDuplicateValidatorConfig extends DuplicateValidatorConfig {
-    @Override
-    default String getType() {
-        return DefaultType.FIELDS;
-    }
-
-    List<String> getFields();
-}

+ 0 - 46
hsweb-boost/hsweb-boost-validator/hsweb-boost-validator-api/src/main/java/org/hswebframework/web/boost/validator/ScriptDuplicateValidatorConfig.java

@@ -1,46 +0,0 @@
-/*
- *  Copyright 2016 http://www.hswebframework.org
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-
-package org.hswebframework.web.boost.validator;
-
-/**
- * 通过脚本来控制数据重复
- *
- * @author zhouhao
- */
-public interface ScriptDuplicateValidatorConfig extends DuplicateValidatorConfig {
-    @Override
-    default String getType() {
-        return DefaultType.SCRIPT;
-    }
-
-    /**
-     * 脚本语言: javascript(js),groovy
-     *
-     * @return 语言
-     */
-    String getScriptLanguage();
-
-    /**
-     * 脚本内容,在进行验证的时候会执行脚本,如果存在重复数据脚本应当返回false。否则返回true
-     *
-     * @return 脚本
-     */
-    String getScript();
-
-}

+ 0 - 50
hsweb-boost/hsweb-boost-validator/hsweb-boost-validator-api/src/main/java/org/hswebframework/web/boost/validator/annotation/RequiresDuplicate.java

@@ -1,50 +0,0 @@
-/*
- *  Copyright 2016 http://www.hswebframework.org
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- *
- */
-
-package org.hswebframework.web.boost.validator.annotation;
-
-
-
-import java.lang.annotation.*;
-
-/**
- * 重复数据验证
- *
- * @author zhouhao
- */
-@Target({ElementType.TYPE, ElementType.METHOD, ElementType.ANNOTATION_TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface RequiresDuplicate {
-
-    /**
-     * @return permission id
-     */
-    String permission();
-
-    /**
-     * @return action array
-     */
-    String[] action() default {};
-
-    /**
-     * @return 自定义控制器bean名称
-     */
-    String controllerBeanName() default "";
-
-}

+ 0 - 21
hsweb-boost/hsweb-boost-validator/hsweb-boost-validator-group/pom.xml

@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-boost-validator</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-boost-validator-group</artifactId>
-
-
-    <dependencies>
-        <dependency>
-            <groupId>org.hibernate</groupId>
-            <artifactId>hibernate-validator</artifactId>
-        </dependency>
-    </dependencies>
-</project>

+ 0 - 38
hsweb-boost/hsweb-boost-validator/pom.xml

@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~  Copyright 2016 http://www.hswebframework.org
-  ~
-  ~  Licensed under the Apache License, Version 2.0 (the "License");
-  ~  you may not use this file except in compliance with the License.
-  ~  You may obtain a copy of the License at
-  ~
-  ~        http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~  Unless required by applicable law or agreed to in writing, software
-  ~  distributed under the License is distributed on an "AS IS" BASIS,
-  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~  See the License for the specific language governing permissions and
-  ~  limitations under the License.
-  ~
-  ~
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>hsweb-boost</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0.0-RC-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-boost-validator</artifactId>
-    <packaging>pom</packaging>
-    <modules>
-        <module>hsweb-boost-validator-api</module>
-        <module>hsweb-boost-validator-group</module>
-    </modules>
-
-
-</project>

+ 0 - 1
hsweb-boost/pom.xml

@@ -30,7 +30,6 @@
     <artifactId>hsweb-boost</artifactId>
     <packaging>pom</packaging>
     <modules>
-        <module>hsweb-boost-validator</module>
         <module>hsweb-boost-aop</module>
         <module>hsweb-boost-ftp</module>
     </modules>

+ 0 - 1
hsweb-commons/controller-use.md

@@ -1 +0,0 @@
-TODO

+ 2 - 1
hsweb-commons/hsweb-commons-controller/README.md

@@ -3,9 +3,10 @@
 
  以`RequestMapping("/user)`为例
  
-| 功能      | http方法&url    |  响应   |   说明 |
+| 功能      | http method&url    |  响应   |   说明 |
 | ------------- | -------------| ------------- | ----|
 |查询|GET /user|HTTP Status:200 {"status":200,"result":{"data":[],"total":0}} |可进行[动态查询](#动态查询)|
+|不分页查询|GET /user/no-paging|HTTP Status:200 {"status":200,"result":[]} |可进行[动态查询](#动态查询)|
 |获取指定id的数据|GET /user/id|HTTP Status:200 {"status":200,"result":{"name":""} |可进行[动态查询](#动态查询)|
 |新增|POST /user|HTTP Status:201 {"status":201,"result":"{id}"} |contentType='application/json' |
 |更新|PUT /user/{id}|HTTP Status:200 {"status":200} |contentType='application/json'|

+ 0 - 5
hsweb-commons/hsweb-commons-entity/pom.xml

@@ -40,11 +40,6 @@
             <artifactId>hsweb-easy-orm-rdb</artifactId>
             <optional>true</optional>
         </dependency>
-        <dependency>
-            <groupId>org.hswebframework.web</groupId>
-            <artifactId>hsweb-boost-validator-group</artifactId>
-            <version>${project.version}</version>
-        </dependency>
         <dependency>
             <groupId>org.hswebframework</groupId>
             <artifactId>hsweb-utils</artifactId>

hsweb-boost/hsweb-boost-validator/hsweb-boost-validator-group/src/main/java/org/hswebframework/web/validator/group/CreateGroup.java → hsweb-core/src/main/java/org/hswebframework/web/validator/group/CreateGroup.java


hsweb-boost/hsweb-boost-validator/hsweb-boost-validator-group/src/main/java/org/hswebframework/web/validator/group/UpdateGroup.java → hsweb-core/src/main/java/org/hswebframework/web/validator/group/UpdateGroup.java