瀏覽代碼

优化自动配置

zhouhao 7 年之前
父節點
當前提交
78b5518408
共有 53 個文件被更改,包括 433 次插入211 次删除
  1. 3 1
      hsweb-authorization/hsweb-authorization-basic/src/main/resources/META-INF/spring.factories
  2. 47 0
      hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/AuthorizationClientAutoConfiguration.java
  3. 18 0
      hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/AuthorizationServerAutoConfiguration.java
  4. 0 12
      hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/CloudAuthorizationAutoConfiguration.java
  5. 24 0
      hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/EnableAuthorizationClient.java
  6. 18 0
      hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/EnableAuthorizationServer.java
  7. 1 2
      hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/feign/FeignAuthenticationManager.java
  8. 15 0
      hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/client/feign/FeignAutoConfiguration.java
  9. 1 1
      hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/feign/FeignUserTokenManager.java
  10. 1 1
      hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/redis/RedisUserTokenManager.java
  11. 1 5
      hsweb-authorization/hsweb-authorization-basic/src/main/java/org/hswebframework/web/authorization/basic/web/UserTokenController.java
  12. 4 1
      hsweb-commons/hsweb-commons-entity/src/main/java/org/hswebframework/web/commons/entity/factory/MapperEntityFactory.java
  13. 3 1
      hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-service01/src/main/java/org/hswebframework/web/examples/cloud/service/Service01Application.java
  14. 6 0
      hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-user-center/pom.xml
  15. 2 0
      hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-user-center/src/main/java/org/hswebframework/web/examples/cloud/user/UserCenterApplication.java
  16. 6 1
      hsweb-starter/hsweb-spring-boot-starter/src/main/java/org/hswebframework/web/starter/HswebAutoConfiguration.java
  17. 2 1
      hsweb-starter/hsweb-spring-boot-starter/src/main/resources/META-INF/spring.factories
  18. 0 2
      hsweb-system/README.md
  19. 4 1
      hsweb-system/hsweb-system-authorization/hsweb-system-authorization-starter/src/main/java/org/hswebframework/web/authorization/starter/AuthorizationAutoConfigration.java
  20. 3 0
      hsweb-system/hsweb-system-authorization/hsweb-system-authorization-starter/src/main/resources/META-INF/spring.factories
  21. 3 1
      hsweb-system/hsweb-system-authorization/hsweb-system-authorization-starter/src/test/java/org/hswebframework/web/starter/authorization/UserTests.java
  22. 0 5
      hsweb-system/hsweb-system-classified/README.md
  23. 0 15
      hsweb-system/hsweb-system-classified/pom.xml
  24. 31 0
      hsweb-system/hsweb-system-config/hsweb-system-config-starter/src/main/java/org/hswebframework/web/config/starter/ConfigAutoConfiguration.java
  25. 3 0
      hsweb-system/hsweb-system-config/hsweb-system-config-starter/src/main/resources/META-INF/spring.factories
  26. 0 15
      hsweb-system/hsweb-system-crawler/pom.xml
  27. 51 46
      hsweb-system/hsweb-system-datasource/hsweb-system-datasource-entity/src/main/java/org/hswebframework/web/entity/datasource/DataSourceConfigEntity.java
  28. 65 60
      hsweb-system/hsweb-system-datasource/hsweb-system-datasource-entity/src/main/java/org/hswebframework/web/entity/datasource/SimpleDataSourceConfigEntity.java
  29. 31 0
      hsweb-system/hsweb-system-datasource/hsweb-system-datasource-starter/src/main/java/org/hswebframework/web/datasource/starter/DataSourceAutoConfiguration.java
  30. 3 0
      hsweb-system/hsweb-system-datasource/hsweb-system-datasource-starter/src/main/resources/META-INF/spring.factories
  31. 1 1
      hsweb-system/hsweb-system-dictionary/hsweb-system-dictionary-service/hsweb-system-dictionary-service-simple/src/test/java/org/hswebframework/web/starter/dictionary/DictionaryParserTests.java
  32. 4 3
      hsweb-system/hsweb-system-dictionary/hsweb-system-dictionary-starter/src/main/java/org/hswebframework/web/starter/dictionary/DictionaryFactoryAutoConfiguration.java
  33. 1 1
      hsweb-system/hsweb-system-dictionary/hsweb-system-dictionary-starter/src/main/resources/META-INF/spring.factories
  34. 1 1
      hsweb-system/hsweb-system-dictionary/hsweb-system-dictionary-starter/src/test/java/org/hswebframework/web/starter/dictionary/DictionaryParserTests.java
  35. 1 1
      hsweb-system/hsweb-system-dictionary/hsweb-system-dictionary-starter/src/test/java/org/hswebframework/web/starter/dictionary/DictionaryTests.java
  36. 0 15
      hsweb-system/hsweb-system-document/pom.xml
  37. 4 3
      hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-starter/src/main/java/org/hswebframework/web/form/DynamicFormAutoConfiguration.java
  38. 16 0
      hsweb-system/hsweb-system-file/hsweb-system-file-starter/src/main/java/org/hswebframework/web/file/starter/FileAutoConfiguration.java
  39. 3 0
      hsweb-system/hsweb-system-file/hsweb-system-file-starter/src/main/resources/META-INF/spring.factories
  40. 3 0
      hsweb-system/hsweb-system-oauth2-client/hsweb-system-oauth2-client-starter/src/main/java/org/hswebframework/web/service/oauth2/client/starter/OAuth2ClientAutoConfiguration.java
  41. 3 0
      hsweb-system/hsweb-system-oauth2-client/hsweb-system-oauth2-client-starter/src/main/resources/META-INF/spring.factories
  42. 1 1
      hsweb-system/hsweb-system-oauth2-server/hsweb-system-oauth2-server-simple/src/main/java/org/hswebframework/web/oauth2/server/simple/CodeGenerator.java
  43. 1 1
      hsweb-system/hsweb-system-oauth2-server/hsweb-system-oauth2-server-simple/src/main/java/org/hswebframework/web/oauth2/server/simple/SimpleAccessTokenService.java
  44. 1 1
      hsweb-system/hsweb-system-oauth2-server/hsweb-system-oauth2-server-simple/src/main/java/org/hswebframework/web/oauth2/server/simple/SimpleAuthorizationCodeService.java
  45. 1 1
      hsweb-system/hsweb-system-oauth2-server/hsweb-system-oauth2-server-simple/src/main/java/org/hswebframework/web/oauth2/server/simple/SimpleClientService.java
  46. 1 1
      hsweb-system/hsweb-system-oauth2-server/hsweb-system-oauth2-server-simple/src/main/java/org/hswebframework/web/oauth2/server/simple/SimplePasswordService.java
  47. 1 1
      hsweb-system/hsweb-system-oauth2-server/hsweb-system-oauth2-server-simple/src/main/java/org/hswebframework/web/oauth2/server/simple/TokenGenerator.java
  48. 4 3
      hsweb-system/hsweb-system-oauth2-server/hsweb-system-oauth2-server-starter/src/main/java/org/hswebframework/web/oauth2/OAuth2GranterAutoConfiguration.java
  49. 0 2
      hsweb-system/hsweb-system-oauth2-server/hsweb-system-oauth2-server-starter/src/main/java/org/hswebframework/web/oauth2/OAuth2ServerErrorControllerAdvice.java
  50. 31 0
      hsweb-system/hsweb-system-organizational/hsweb-system-organizational-starter/src/main/java/org/hswebframework/web/organizational/starter/AuthorizationAutoConfigration.java
  51. 3 0
      hsweb-system/hsweb-system-organizational/hsweb-system-organizational-starter/src/main/resources/META-INF/spring.factories
  52. 3 4
      hsweb-system/hsweb-system-schedule/hsweb-system-schedule-starter/src/main/java/org/hswebframework/web/schedule/configuration/ScheduleAutoConfiguration.java
  53. 3 0
      hsweb-system/hsweb-system-schedule/hsweb-system-schedule-starter/src/main/resources/META-INF/spring.factories

+ 3 - 1
hsweb-authorization/hsweb-authorization-basic/src/main/resources/META-INF/spring.factories

@@ -1,3 +1,5 @@
 # Auto Configure
 org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.hswebframework.web.authorization.basic.configuration.CorsAutoConfiguration
+org.hswebframework.web.authorization.basic.configuration.CorsAutoConfiguration,\
+org.hswebframework.web.authorization.basic.configuration.AopAuthorizeAutoConfiguration,\
+org.hswebframework.web.authorization.basic.configuration.AuthorizingHandlerAutoConfiguration

+ 47 - 0
hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/AuthorizationClientAutoConfiguration.java

@@ -0,0 +1,47 @@
+package org.hswebframework.web.authorization.cloud;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.ImportSelector;
+import org.springframework.core.type.AnnotationMetadata;
+import org.springframework.util.ClassUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author zhouhao
+ * @since
+ */
+@Configuration
+public class AuthorizationClientAutoConfiguration implements ImportSelector {
+
+    @Override
+    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
+        Map<String, Object> attrs = importingClassMetadata.getAnnotationAttributes(EnableAuthorizationClient.class.getName());
+
+        EnableAuthorizationClient.Type type = (EnableAuthorizationClient.Type) attrs.get("type");
+        List<String> classNames = new ArrayList<>();
+
+        if (type != null) {
+            switch (type) {
+                case Feign:
+                    classNames.add("org.hswebframework.web.authorization.cloud.client.feign.FeignAutoConfiguration");
+                    break;
+                case Redis:
+                    throw new UnsupportedOperationException("redis not support yet");
+                case Auto:
+                default:
+                    try {
+                        Class.forName("org.springframework.cloud.netflix.feign.FeignClient");
+                        classNames.add("org.hswebframework.web.authorization.cloud.client.feign.FeignAutoConfiguration");
+                    } catch (ClassNotFoundException e) {
+                        // load redis not support yet
+                        throw new UnsupportedOperationException("feign client ");
+                    }
+                    break;
+            }
+        }
+        return classNames.toArray(new String[classNames.size()]);
+    }
+}

+ 18 - 0
hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/AuthorizationServerAutoConfiguration.java

@@ -0,0 +1,18 @@
+package org.hswebframework.web.authorization.cloud;
+
+import org.hswebframework.web.authorization.cloud.server.UserTokenController;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author zhouhao
+ * @since
+ */
+@Configuration
+public class AuthorizationServerAutoConfiguration {
+
+    @Bean
+    public UserTokenController userTokenController() {
+        return new UserTokenController();
+    }
+}

+ 0 - 12
hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/CloudAuthorizationAutoConfiguration.java

@@ -1,12 +0,0 @@
-package org.hswebframework.web.authorization.cloud;
-
-import org.springframework.context.annotation.Configuration;
-
-/**
- * @author zhouhao
- * @since
- */
-@Configuration
-public class CloudAuthorizationAutoConfiguration {
-
-}

+ 24 - 0
hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/EnableAuthorizationClient.java

@@ -0,0 +1,24 @@
+package org.hswebframework.web.authorization.cloud;
+
+import org.springframework.context.annotation.Import;
+
+import java.lang.annotation.*;
+
+/**
+ * TODO 完成注释
+ *
+ * @author zhouhao
+ * @since
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+@Documented
+@Import(AuthorizationServerAutoConfiguration.class)
+public @interface EnableAuthorizationClient {
+
+    Type value() default Type.Auto;
+
+    enum Type {
+        Auto, Feign, Redis
+    }
+}

+ 18 - 0
hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/EnableAuthorizationServer.java

@@ -0,0 +1,18 @@
+package org.hswebframework.web.authorization.cloud;
+
+import org.springframework.context.annotation.Import;
+
+import java.lang.annotation.*;
+
+/**
+ * TODO 完成注释
+ *
+ * @author zhouhao
+ * @since
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+@Documented
+@Import(AuthorizationServerAutoConfiguration.class)
+public @interface EnableAuthorizationServer {
+}

+ 1 - 2
hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/feign/FeignAuthenticationManager.java

@@ -1,10 +1,9 @@
-package org.hswebframework.web.authorization.cloud.feign;
+package org.hswebframework.web.authorization.cloud.client.feign;
 
 import org.hswebframework.web.authorization.Authentication;
 import org.hswebframework.web.authorization.AuthenticationManager;
 import org.springframework.cloud.netflix.feign.FeignClient;
 import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 

+ 15 - 0
hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/client/feign/FeignAutoConfiguration.java

@@ -0,0 +1,15 @@
+package org.hswebframework.web.authorization.cloud.client.feign;
+
+import org.springframework.cloud.netflix.feign.EnableFeignClients;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * TODO 完成注释
+ *
+ * @author zhouhao
+ * @since
+ */
+@Configuration
+@EnableFeignClients("org.hswebframework.web.authorization.cloud.client.feign")
+public class FeignAutoConfiguration {
+}

+ 1 - 1
hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/feign/FeignUserTokenManager.java

@@ -1,4 +1,4 @@
-package org.hswebframework.web.authorization.cloud.feign;
+package org.hswebframework.web.authorization.cloud.client.feign;
 
 import org.hswebframework.web.authorization.token.TokenState;
 import org.hswebframework.web.authorization.token.UserToken;

+ 1 - 1
hsweb-authorization/hsweb-authorization-cloud/src/main/java/org/hswebframework/web/authorization/cloud/redis/RedisUserTokenManager.java

@@ -1,4 +1,4 @@
-package org.hswebframework.web.authorization.cloud.redis;
+package org.hswebframework.web.authorization.cloud.client.redis;
 
 import org.hswebframework.web.authorization.token.UserTokenManager;
 

+ 1 - 5
hsweb-authorization/hsweb-authorization-basic/src/main/java/org/hswebframework/web/authorization/basic/web/UserTokenController.java

@@ -1,4 +1,4 @@
-package org.hswebframework.web.authorization.basic.web;
+package org.hswebframework.web.authorization.cloud.server;
 
 import org.hswebframework.web.authorization.Authentication;
 import org.hswebframework.web.authorization.AuthenticationManager;
@@ -11,13 +11,9 @@ import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
 
-/**
- * Created by zhouhao on 2017/10/10.
- */
 @RestController
 @RequestMapping
 public class UserTokenController {
-
     private UserTokenManager userTokenManager;
 
     private AuthenticationManager authenticationManager;

+ 4 - 1
hsweb-commons/hsweb-commons-entity/src/main/java/org/hswebframework/web/commons/entity/factory/MapperEntityFactory.java

@@ -178,7 +178,10 @@ public class MapperEntityFactory implements EntityFactory {
         mapper = initCache(beanClass);
         if (mapper != null)
             return mapper.getTarget();
-        return beanClass;
+
+        return Modifier.isAbstract(beanClass.getModifiers())
+                || Modifier.isInterface(beanClass.getModifiers())
+                ? null : beanClass;
     }
 
     public void setDefaultMapperFactory(DefaultMapperFactory defaultMapperFactory) {

+ 3 - 1
hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-service01/src/main/java/org/hswebframework/web/examples/cloud/service/Service01Application.java

@@ -1,6 +1,7 @@
 package org.hswebframework.web.examples.cloud.service;
 
 
+import org.hswebframework.web.authorization.cloud.EnableAuthorizationClient;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@@ -12,7 +13,8 @@ import org.springframework.context.annotation.Configuration;
 @EnableDiscoveryClient
 @EnableHystrix
 @Configuration
-@EnableFeignClients("org.hswebframework.web.authorization.cloud.feign")
+@EnableFeignClients("org.hswebframework.web.authorization.cloud.client.feign")
+@EnableAuthorizationClient
 public class Service01Application {
 
     public static void main(String[] args) {

+ 6 - 0
hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-user-center/pom.xml

@@ -63,6 +63,12 @@
             <version>${project.version}</version>
         </dependency>
 
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-authorization-cloud</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-logging</artifactId>

+ 2 - 0
hsweb-examples/hsweb-examples-cloud/hsweb-examples-cloud-user-center/src/main/java/org/hswebframework/web/examples/cloud/user/UserCenterApplication.java

@@ -1,5 +1,6 @@
 package org.hswebframework.web.examples.cloud.user;
 
+import org.hswebframework.web.authorization.cloud.EnableAuthorizationServer;
 import org.hswebframework.web.entity.authorization.UserEntity;
 import org.hswebframework.web.service.authorization.UserService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -16,6 +17,7 @@ import org.springframework.context.annotation.Configuration;
 @EnableHystrix
 @Configuration
 @EnableCaching
+@EnableAuthorizationServer
 public class UserCenterApplication implements CommandLineRunner{
     public static void main(String[] args) {
         SpringApplication.run(UserCenterApplication.class, args);

+ 6 - 1
hsweb-starter/hsweb-spring-boot-starter/src/main/java/org/hswebframework/web/starter/HswebAutoConfiguration.java

@@ -68,7 +68,7 @@ import java.util.List;
  * @author zhouhao
  */
 @Configuration
-@ComponentScan("org.hswebframework.web")
+//@ComponentScan("org.hswebframework.web")
 @EnableConfigurationProperties(EntityProperties.class)
 @ImportAutoConfiguration(EntityFactoryInitConfiguration.class)
 public class HswebAutoConfiguration {
@@ -199,4 +199,9 @@ public class HswebAutoConfiguration {
         }
     }
 
+    @Bean
+    public RestControllerExceptionTranslator restControllerExceptionTranslator(){
+        return new RestControllerExceptionTranslator();
+    }
+
 }

+ 2 - 1
hsweb-starter/hsweb-spring-boot-starter/src/main/resources/META-INF/spring.factories

@@ -1,3 +1,4 @@
 # Auto Configure
 org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.hswebframework.web.starter.HswebAutoConfiguration
+org.hswebframework.web.starter.HswebAutoConfiguration,\
+org.hswebframework.web.starter.SystemInitializeAutoConfiguration

+ 0 - 2
hsweb-system/README.md

@@ -8,11 +8,9 @@
 |[hsweb-system-authorization](hsweb-system-authorization) |权限管理| 90%|
 |[hsweb-system-cli](hsweb-system-cli)|在线命令行功能,在线执行命令| 0%|
 |[hsweb-system-config](hsweb-system-config)|系统配置功能| 60%|
-|[hsweb-system-crawler](hsweb-system-crawler)|爬虫功能| 0%|
 |[hsweb-system-database-manager](hsweb-system-database-manager)|在线数据库维护| 0%|
 |[hsweb-system-datasource](hsweb-system-datasource)|动态数据源管理| 0%|
 |[hsweb-system-dictionary](hsweb-system-dictionary)| 数据字典功能|  80%|
-|[hsweb-system-document](hsweb-system-document)|文档管理功能| 0%|
 |[hsweb-system-dynamic-form](hsweb-system-dynamic-form)|动态表单| 80%|
 |[hsweb-system-explorer](hsweb-system-menu)|**系统菜单**| 80%|
 |[hsweb-system-file](hsweb-system-file)|文件管理| 100%|

+ 4 - 1
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-starter/src/main/java/org/hswebframework/web/authorization/starter/AuthorizationAutoConfigration.java

@@ -29,6 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
 
 import java.util.List;
@@ -37,7 +38,9 @@ import java.util.List;
  * @author zhouhao
  */
 @Configuration
-public class AuthorizationAutoConfigration {
+@ComponentScan({"org.hswebframework.web.service.authorization.simple"
+        , "org.hswebframework.web.controller.authorization"})
+public class AuthorizationAutoConfiguration {
 
     @Autowired(required = false)
     private List<AuthorizationListener> listeners;

+ 3 - 0
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-starter/src/main/resources/META-INF/spring.factories

@@ -0,0 +1,3 @@
+# Auto Configure
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.hswebframework.web.authorization.starter.AuthorizationAutoConfiguration

+ 3 - 1
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-starter/src/test/java/org/hswebframework/web/starter/authorization/UserTests.java

@@ -32,14 +32,16 @@ import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
 
 import java.sql.SQLException;
 
 /**
- * TODO 完成注释
  *
  * @author zhouhao
  */
+@Configuration
+@Import(UserTests.Config.class)
 public class UserTests extends SimpleWebApplicationTests {
 
     @Configuration

+ 0 - 5
hsweb-system/hsweb-system-classified/README.md

@@ -1,5 +0,0 @@
-## 分类管理
-用于系统各种数据的分类管理,不同的类型数据都可使用此功能进行分类管理
-
-##API
-//todo

+ 0 - 15
hsweb-system/hsweb-system-classified/pom.xml

@@ -1,15 +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-system</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-system-classified</artifactId>
-
-
-</project>

+ 31 - 0
hsweb-system/hsweb-system-config/hsweb-system-config-starter/src/main/java/org/hswebframework/web/config/starter/ConfigAutoConfiguration.java

@@ -0,0 +1,31 @@
+/*
+ *  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.config.starter;
+
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author zhouhao
+ */
+@Configuration
+@ComponentScan({"org.hswebframework.web.service.config.simple"
+        , "org.hswebframework.web.controller.config"})
+public class ConfigAutoConfiguration {
+}

+ 3 - 0
hsweb-system/hsweb-system-config/hsweb-system-config-starter/src/main/resources/META-INF/spring.factories

@@ -0,0 +1,3 @@
+# Auto Configure
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.hswebframework.web.config.starter.ConfigAutoConfiguration

+ 0 - 15
hsweb-system/hsweb-system-crawler/pom.xml

@@ -1,15 +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-system</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-system-crawler</artifactId>
-
-
-</project>

+ 51 - 46
hsweb-system/hsweb-system-datasource/hsweb-system-datasource-entity/src/main/java/org/hswebframework/web/entity/datasource/DataSourceConfigEntity.java

@@ -1,66 +1,71 @@
 package org.hswebframework.web.entity.datasource;
+
 import org.hswebframework.web.commons.entity.GenericEntity;
 
 /**
-* 数据源配置 实体
-* @author hsweb-generator-online
-*/
-public interface DataSourceConfigEntity extends GenericEntity<String>{
+ * 数据源配置 实体
+ *
+ * @author hsweb-generator-online
+ */
+public interface DataSourceConfigEntity extends GenericEntity<String> {
  /*-------------------------------------------
     |               属性名常量               |
     ===========================================*/
-     /**
+    /**
      * 数据源名称
      */
-     String name="name";
-     /**
+    String name       = "name";
+    /**
      * 是否启用
      */
-     String enabled="enabled";
-     /**
+    String enabled    = "enabled";
+    /**
      * 创建日期
      */
-     String createDate="createDate";
-     /**
+    String createDate = "createDate";
+    /**
      * 备注
      */
-     String describe="describe";
-    
-        /**
-        * @return 数据源名称
-        */
-        String getName();
+    String describe   = "describe";
+
+    /**
+     * @return 数据源名称
+     */
+    String getName();
+
+    /**
+     * @param name 数据源名称
+     */
+    void setName(String name);
+
+    /**
+     * @return 是否启用
+     */
+    Long getEnabled();
 
-        /**
-        * @param  name  数据源名称
-        */
-        void setName(String name);
-        /**
-        * @return 是否启用
-        */
-        Long getEnabled();
+    /**
+     * @param enabled 是否启用
+     */
+    void setEnabled(Long enabled);
+
+    /**
+     * @return 创建日期
+     */
+    java.util.Date getCreateDate();
 
-        /**
-        * @param  enabled  是否启用
-        */
-        void setEnabled(Long enabled);
-        /**
-        * @return 创建日期
-        */
-        java.util.Date getCreateDate();
+    /**
+     * @param createDate 创建日期
+     */
+    void setCreateDate(java.util.Date createDate);
 
-        /**
-        * @param  createDate  创建日期
-        */
-        void setCreateDate(java.util.Date createDate);
-        /**
-        * @return 备注
-        */
-        String getDescribe();
+    /**
+     * @return 备注
+     */
+    String getDescribe();
+
+    /**
+     * @param describe 备注
+     */
+    void setDescribe(String describe);
 
-        /**
-        * @param  describe  备注
-        */
-        void setDescribe(String describe);
-      
 }

+ 65 - 60
hsweb-system/hsweb-system-datasource/hsweb-system-datasource-entity/src/main/java/org/hswebframework/web/entity/datasource/SimpleDataSourceConfigEntity.java

@@ -1,70 +1,75 @@
 package org.hswebframework.web.entity.datasource;
+
 import org.hswebframework.web.commons.entity.SimpleGenericEntity;
 
 /**
-* 数据源配置
-* @author hsweb-generator-online
-*/
-public class SimpleDataSourceConfigEntity extends SimpleGenericEntity<String> implements DataSourceConfigEntity{
-  		//数据源名称
-        private String name;
-  		//是否启用
-        private Long enabled;
-  		//创建日期
-        private java.util.Date createDate;
-  		//备注
-        private String describe;
+ * 数据源配置
+ *
+ * @author hsweb-generator-online
+ */
+public class SimpleDataSourceConfigEntity extends SimpleGenericEntity<String> implements DataSourceConfigEntity {
+    //数据源名称
+    private String         name;
+    //是否启用
+    private Long           enabled;
+    //创建日期
+    private java.util.Date createDate;
+    //备注
+    private String         describe;
+
+    /**
+     * @return 数据源名称
+     */
+    public String getName() {
+        return this.name;
+    }
+
+    /**
+     * @param name 数据源名称
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return 是否启用
+     */
+    public Long getEnabled() {
+        return this.enabled;
+    }
 
-        /**
-        * @return  数据源名称
-        */
-        public String getName(){
-			return this.name;
-        }
+    /**
+     * @param enabled 是否启用
+     */
+    public void setEnabled(Long enabled) {
+        this.enabled = enabled;
+    }
 
-        /**
-        * @param  name  数据源名称
-        */
-        public void setName(String name){
-        	this.name=name;
-        }
-        /**
-        * @return  是否启用
-        */
-        public Long getEnabled(){
-			return this.enabled;
-        }
+    /**
+     * @return 创建日期
+     */
+    public java.util.Date getCreateDate() {
+        return this.createDate;
+    }
 
-        /**
-        * @param  enabled  是否启用
-        */
-        public void setEnabled(Long enabled){
-        	this.enabled=enabled;
-        }
-        /**
-        * @return  创建日期
-        */
-        public java.util.Date getCreateDate(){
-			return this.createDate;
-        }
+    /**
+     * @param createDate 创建日期
+     */
+    public void setCreateDate(java.util.Date createDate) {
+        this.createDate = createDate;
+    }
 
-        /**
-        * @param  createDate  创建日期
-        */
-        public void setCreateDate(java.util.Date createDate){
-        	this.createDate=createDate;
-        }
-        /**
-        * @return  备注
-        */
-        public String getDescribe(){
-			return this.describe;
-        }
+    /**
+     * @return 备注
+     */
+    public String getDescribe() {
+        return this.describe;
+    }
 
-        /**
-        * @param  describe  备注
-        */
-        public void setDescribe(String describe){
-        	this.describe=describe;
-        }
+    /**
+     * @param describe 备注
+     */
+    public void setDescribe(String describe) {
+        this.describe = describe;
+    }
 }

+ 31 - 0
hsweb-system/hsweb-system-datasource/hsweb-system-datasource-starter/src/main/java/org/hswebframework/web/datasource/starter/DataSourceAutoConfiguration.java

@@ -0,0 +1,31 @@
+/*
+ *  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.datasource.starter;
+
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author zhouhao
+ */
+@Configuration
+@ComponentScan({"org.hswebframework.web.service.datasource.simple"
+        , "org.hswebframework.web.controller.datasource"})
+public class DataSourceAutoConfiguration {
+}

+ 3 - 0
hsweb-system/hsweb-system-datasource/hsweb-system-datasource-starter/src/main/resources/META-INF/spring.factories

@@ -0,0 +1,3 @@
+# Auto Configure
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.hswebframework.web.datasource.starter.DataSourceAutoConfiguration

+ 1 - 1
hsweb-system/hsweb-system-dictionary/hsweb-system-dictionary-service/hsweb-system-dictionary-service-simple/src/test/java/org/hswebframework/web/starter/dictionary/DictionaryParserTests.java

@@ -16,7 +16,7 @@
  *
  */
 
-package org.hswebframework.web.starter.dictionary;
+package org.hswebframework.web.dictionary.starter;
 
 import com.alibaba.fastjson.JSON;
 import org.hswebframework.web.entity.dictionary.DictionaryItemEntity;

+ 4 - 3
hsweb-system/hsweb-system-dictionary/hsweb-system-dictionary-starter/src/main/java/org/hswebframework/web/starter/dictionary/DictionaryFactoryAutoConfiguration.java

@@ -1,17 +1,18 @@
-package org.hswebframework.web.starter.dictionary;
+package org.hswebframework.web.dictionary.starter;
 
 import org.hswebframework.web.service.dictionary.builder.DictionaryParserBuilder;
 import org.hswebframework.web.service.dictionary.simple.builder.SimpleDictionaryParserBuilder;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
 
 /**
- * TODO 完成注释
- *
  * @author zhouhao
  */
 @Configuration
+@ComponentScan({"org.hswebframework.web.service.dictionary.simple"
+        , "org.hswebframework.web.controller.dictionary"})
 public class DictionaryFactoryAutoConfiguration {
     @Bean
     @ConditionalOnMissingBean(DictionaryParserBuilder.class)

+ 1 - 1
hsweb-system/hsweb-system-dictionary/hsweb-system-dictionary-starter/src/main/resources/META-INF/spring.factories

@@ -1,3 +1,3 @@
 # Auto Configure
 org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.hswebframework.web.starter.dictionary.DictionaryFactoryAutoConfiguration
+org.hswebframework.web.dictionary.starter.DictionaryFactoryAutoConfiguration

+ 1 - 1
hsweb-system/hsweb-system-dictionary/hsweb-system-dictionary-starter/src/test/java/org/hswebframework/web/starter/dictionary/DictionaryParserTests.java

@@ -16,7 +16,7 @@
  *
  */
 
-package org.hswebframework.web.starter.dictionary;
+package org.hswebframework.web.dictionary.starter;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;

+ 1 - 1
hsweb-system/hsweb-system-dictionary/hsweb-system-dictionary-starter/src/test/java/org/hswebframework/web/starter/dictionary/DictionaryTests.java

@@ -16,7 +16,7 @@
  *
  */
 
-package org.hswebframework.web.starter.dictionary;
+package org.hswebframework.web.dictionary.starter;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;

+ 0 - 15
hsweb-system/hsweb-system-document/pom.xml

@@ -1,15 +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-system</artifactId>
-        <groupId>org.hswebframework.web</groupId>
-        <version>3.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>hsweb-system-document</artifactId>
-
-
-</project>

+ 4 - 3
hsweb-system/hsweb-system-dynamic-form/hsweb-system-dynamic-form-starter/src/main/java/org/hswebframework/web/form/DynamicFormAutoConfiguration.java

@@ -5,17 +5,18 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.CommandLineRunner;
+import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.core.Ordered;
 import org.springframework.core.annotation.Order;
 
 /**
- * TODO 完成注释
- *
  * @author zhouhao
  */
 @Configuration
-@Order(Ordered.LOWEST_PRECEDENCE)
+@Order
+@ComponentScan({"org.hswebframework.web.service.form.simple"
+        , "org.hswebframework.web.controller.form"})
 public class DynamicFormAutoConfiguration implements CommandLineRunner {
 
     private Logger logger = LoggerFactory.getLogger(this.getClass());

+ 16 - 0
hsweb-system/hsweb-system-file/hsweb-system-file-starter/src/main/java/org/hswebframework/web/file/starter/FileAutoConfiguration.java

@@ -0,0 +1,16 @@
+package org.hswebframework.web.file.starter;
+
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * TODO 完成注释
+ *
+ * @author zhouhao
+ * @since
+ */
+@Configuration
+@ComponentScan({"org.hswebframework.web.service.file.simple"
+        , "org.hswebframework.web.controller.file"})
+public class FileAutoConfiguration {
+}

+ 3 - 0
hsweb-system/hsweb-system-file/hsweb-system-file-starter/src/main/resources/META-INF/spring.factories

@@ -0,0 +1,3 @@
+# Auto Configure
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.hswebframework.web.file.starter.FileAutoConfiguration

+ 3 - 0
hsweb-system/hsweb-system-oauth2-client/hsweb-system-oauth2-client-starter/src/main/java/org/hswebframework/web/service/oauth2/client/starter/OAuth2ClientAutoConfiguration.java

@@ -26,6 +26,7 @@ import org.hswebframework.web.service.oauth2.client.simple.request.builder.Simpl
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 
@@ -34,6 +35,8 @@ import org.springframework.context.annotation.Configuration;
  */
 @Configuration
 @ConditionalOnMissingBean(OAuth2RequestBuilderFactory.class)
+@ComponentScan({"org.hswebframework.web.service.oauth2.client.simple"
+        , "org.hswebframework.web.authorization.oauth2.controller"})
 public class OAuth2ClientAutoConfiguration {
 
     @Bean

+ 3 - 0
hsweb-system/hsweb-system-oauth2-client/hsweb-system-oauth2-client-starter/src/main/resources/META-INF/spring.factories

@@ -0,0 +1,3 @@
+# Auto Configure
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.hswebframework.web.service.oauth2.client.starter.OAuth2ClientAutoConfiguration

+ 1 - 1
hsweb-system/hsweb-system-oauth2-server/hsweb-system-oauth2-server-simple/src/main/java/org/hswebframework/web/oauth2/server/simple/CodeGenerator.java

@@ -16,7 +16,7 @@
  *
  */
 
-package org.hswebframework.web.oauth2.server.simple;
+package org.hswebframework.web.service.oauth2.server.simple;
 
 /**
  * TODO 完成注释

+ 1 - 1
hsweb-system/hsweb-system-oauth2-server/hsweb-system-oauth2-server-simple/src/main/java/org/hswebframework/web/oauth2/server/simple/SimpleAccessTokenService.java

@@ -16,7 +16,7 @@
  *
  */
 
-package org.hswebframework.web.oauth2.server.simple;
+package org.hswebframework.web.service.oauth2.server.simple;
 
 
 import org.hswebframework.web.authorization.oauth2.server.entity.OAuth2AccessEntity;

+ 1 - 1
hsweb-system/hsweb-system-oauth2-server/hsweb-system-oauth2-server-simple/src/main/java/org/hswebframework/web/oauth2/server/simple/SimpleAuthorizationCodeService.java

@@ -16,7 +16,7 @@
  *
  */
 
-package org.hswebframework.web.oauth2.server.simple;
+package org.hswebframework.web.service.oauth2.server.simple;
 
 import org.hswebframework.web.authorization.oauth2.server.entity.AuthorizationCodeEntity;
 import org.hswebframework.web.authorization.oauth2.server.support.code.AuthorizationCode;

+ 1 - 1
hsweb-system/hsweb-system-oauth2-server/hsweb-system-oauth2-server-simple/src/main/java/org/hswebframework/web/oauth2/server/simple/SimpleClientService.java

@@ -16,7 +16,7 @@
  *
  */
 
-package org.hswebframework.web.oauth2.server.simple;
+package org.hswebframework.web.service.oauth2.server.simple;
 
 import org.hswebframework.web.authorization.oauth2.server.client.OAuth2Client;
 import org.hswebframework.web.authorization.oauth2.server.client.OAuth2ClientService;

+ 1 - 1
hsweb-system/hsweb-system-oauth2-server/hsweb-system-oauth2-server-simple/src/main/java/org/hswebframework/web/oauth2/server/simple/SimplePasswordService.java

@@ -16,7 +16,7 @@
  *
  */
 
-package org.hswebframework.web.oauth2.server.simple;
+package org.hswebframework.web.service.oauth2.server.simple;
 
 import org.hswebframework.web.authorization.oauth2.server.support.password.PasswordService;
 import org.hswebframework.web.entity.authorization.UserEntity;

+ 1 - 1
hsweb-system/hsweb-system-oauth2-server/hsweb-system-oauth2-server-simple/src/main/java/org/hswebframework/web/oauth2/server/simple/TokenGenerator.java

@@ -16,7 +16,7 @@
  *
  */
 
-package org.hswebframework.web.oauth2.server.simple;
+package org.hswebframework.web.service.oauth2.server.simple;
 
 /**
  * TODO 完成注释

+ 4 - 3
hsweb-system/hsweb-system-oauth2-server/hsweb-system-oauth2-server-starter/src/main/java/org/hswebframework/web/oauth2/OAuth2GranterAutoConfiguration.java

@@ -36,14 +36,14 @@ import org.hswebframework.web.commons.entity.factory.EntityFactory;
 import org.hswebframework.web.dao.oauth2.AuthorizationCodeDao;
 import org.hswebframework.web.dao.oauth2.OAuth2AccessDao;
 import org.hswebframework.web.dao.oauth2.OAuth2ClientDao;
-import org.hswebframework.web.oauth2.server.simple.*;
 import org.hswebframework.web.service.authorization.UserService;
+import org.hswebframework.web.service.oauth2.server.simple.*;
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.config.BeanPostProcessor;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
 
 
@@ -53,6 +53,8 @@ import org.springframework.context.annotation.Configuration;
  * @author zhouhao
  */
 @Configuration
+@ComponentScan({"org.hswebframework.web.service.oauth2.server.simple"
+        , "org.hswebframework.web.authorization.oauth2.controller"})
 public class OAuth2GranterAutoConfiguration {
 
     @Autowired(required = false)
@@ -66,7 +68,6 @@ public class OAuth2GranterAutoConfiguration {
         return new OAuth2ServerErrorControllerAdvice();
     }
 
-
     @ConditionalOnMissingBean(AuthorizationCodeService.class)
     @Bean
     public SimpleAuthorizationCodeService simpleAuthorizationCodeService(AuthorizationCodeDao authorizationCodeDao,

+ 0 - 2
hsweb-system/hsweb-system-oauth2-server/hsweb-system-oauth2-server-starter/src/main/java/org/hswebframework/web/oauth2/OAuth2ServerErrorControllerAdvice.java

@@ -8,8 +8,6 @@ import org.springframework.web.bind.annotation.ResponseStatus;
 import org.springframework.web.bind.annotation.RestControllerAdvice;
 
 /**
- * TODO 完成注释
- *
  * @author zhouhao
  */
 @RestControllerAdvice

+ 31 - 0
hsweb-system/hsweb-system-organizational/hsweb-system-organizational-starter/src/main/java/org/hswebframework/web/organizational/starter/AuthorizationAutoConfigration.java

@@ -0,0 +1,31 @@
+/*
+ *  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.organizational.starter;
+
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author zhouhao
+ */
+@Configuration
+@ComponentScan({"org.hswebframework.web.service.organizational.simple"
+        , "org.hswebframework.web.controller.organizational"})
+public class AuthorizationAutoConfigration {
+}

+ 3 - 0
hsweb-system/hsweb-system-organizational/hsweb-system-organizational-starter/src/main/resources/META-INF/spring.factories

@@ -0,0 +1,3 @@
+# Auto Configure
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.hswebframework.web.organizational.starter.AuthorizationAutoConfigration

+ 3 - 4
hsweb-system/hsweb-system-schedule/hsweb-system-schedule-starter/src/main/java/org/hswebframework/web/schedule/configuration/ScheduleAutoConfiguration.java

@@ -1,7 +1,5 @@
 package org.hswebframework.web.schedule.configuration;
 
-import org.hswebframework.web.datasource.DataSourceHolder;
-import org.hswebframework.web.datasource.DatabaseType;
 import org.hswebframework.web.service.schedule.simple.DynamicJobFactory;
 import org.quartz.Calendar;
 import org.quartz.Scheduler;
@@ -13,6 +11,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.scheduling.quartz.AdaptableJobFactory;
 import org.springframework.scheduling.quartz.SchedulerFactoryBean;
@@ -22,13 +21,13 @@ import javax.sql.DataSource;
 import java.util.Map;
 
 /**
- * TODO 完成注释
- *
  * @author zhouhao
  */
 @Configuration
 @EnableConfigurationProperties(SchedulerProperties.class)
 @ConditionalOnMissingBean({Scheduler.class, SchedulerFactoryBean.class})
+@ComponentScan({"org.hswebframework.web.service.schedule.simple"
+        , "org.hswebframework.web.controller.schedule"})
 public class ScheduleAutoConfiguration {
     @Autowired
     private SchedulerProperties schedulerProperties;

+ 3 - 0
hsweb-system/hsweb-system-schedule/hsweb-system-schedule-starter/src/main/resources/META-INF/spring.factories

@@ -0,0 +1,3 @@
+# Auto Configure
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.hswebframework.web.schedule.configuration.ScheduleAutoConfiguration