Browse Source

add auto configuration

zhouhao 7 years ago
parent
commit
1dfde9e5dd

+ 96 - 88
hsweb-system/hsweb-system-module/hsweb-system-module-entity/src/main/java/org/hswebframework/web/entity/module/SimpleModuleEntity.java

@@ -1,100 +1,108 @@
 package org.hswebframework.web.entity.module;
+
 import org.hswebframework.web.commons.entity.SimpleGenericEntity;
 
 /**
-* 系统自定义模块
-* @author hsweb-generator-online
-*/
-public class SimpleModuleEntity extends SimpleGenericEntity<String> implements ModuleEntity{
-  		//名称
-        private String name;
-  		//权限id
-        private String permissionId;
-  		//备注
-        private String remark;
-  		//列表配置
-        private String listMeta;
-  		//保存页配置
-        private String saveMeta;
-  		//状态
-        private Long status;
+ * 系统自定义模块
+ *
+ * @author hsweb-generator-online
+ */
+public class SimpleModuleEntity extends SimpleGenericEntity<String> implements ModuleEntity {
+    private static final long serialVersionUID = -25986777322199816L;
+    //名称
+    private String name;
+    //权限id
+    private String permissionId;
+    //备注
+    private String remark;
+    //列表配置
+    private String listMeta;
+    //保存页配置
+    private String saveMeta;
+    //状态
+    private Long   status;
+
+    /**
+     * @return 名称
+     */
+    public String getName() {
+        return this.name;
+    }
+
+    /**
+     * @param name 名称
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return 权限id
+     */
+    public String getPermissionId() {
+        return this.permissionId;
+    }
+
+    /**
+     * @param permissionId 权限id
+     */
+    public void setPermissionId(String permissionId) {
+        this.permissionId = permissionId;
+    }
+
+    /**
+     * @return 备注
+     */
+    public String getRemark() {
+        return this.remark;
+    }
 
-        /**
-        * @return  名称
-        */
-        public String getName(){
-			return this.name;
-        }
+    /**
+     * @param remark 备注
+     */
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
 
-        /**
-        * @param  name  名称
-        */
-        public void setName(String name){
-        	this.name=name;
-        }
-        /**
-        * @return  权限id
-        */
-        public String getPermissionId(){
-			return this.permissionId;
-        }
+    /**
+     * @return 列表配置
+     */
+    public String getListMeta() {
+        return this.listMeta;
+    }
 
-        /**
-        * @param  permissionId  权限id
-        */
-        public void setPermissionId(String permissionId){
-        	this.permissionId=permissionId;
-        }
-        /**
-        * @return  备注
-        */
-        public String getRemark(){
-			return this.remark;
-        }
+    /**
+     * @param listMeta 列表配置
+     */
+    public void setListMeta(String listMeta) {
+        this.listMeta = listMeta;
+    }
 
-        /**
-        * @param  remark  备注
-        */
-        public void setRemark(String remark){
-        	this.remark=remark;
-        }
-        /**
-        * @return  列表配置
-        */
-        public String getListMeta(){
-			return this.listMeta;
-        }
+    /**
+     * @return 保存页配置
+     */
+    public String getSaveMeta() {
+        return this.saveMeta;
+    }
 
-        /**
-        * @param  listMeta  列表配置
-        */
-        public void setListMeta(String listMeta){
-        	this.listMeta=listMeta;
-        }
-        /**
-        * @return  保存页配置
-        */
-        public String getSaveMeta(){
-			return this.saveMeta;
-        }
+    /**
+     * @param saveMeta 保存页配置
+     */
+    public void setSaveMeta(String saveMeta) {
+        this.saveMeta = saveMeta;
+    }
 
-        /**
-        * @param  saveMeta  保存页配置
-        */
-        public void setSaveMeta(String saveMeta){
-        	this.saveMeta=saveMeta;
-        }
-        /**
-        * @return  状态
-        */
-        public Long getStatus(){
-			return this.status;
-        }
+    /**
+     * @return 状态
+     */
+    public Long getStatus() {
+        return this.status;
+    }
 
-        /**
-        * @param  status  状态
-        */
-        public void setStatus(Long status){
-        	this.status=status;
-        }
+    /**
+     * @param status 状态
+     */
+    public void setStatus(Long status) {
+        this.status = status;
+    }
 }

+ 14 - 0
hsweb-system/hsweb-system-module/hsweb-system-module-starter/src/main/java/org/hswebframework/web/template/starter/ModuleAutoConfiguration.java

@@ -0,0 +1,14 @@
+package org.hswebframework.web.template.starter;
+
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author zhouhao
+ * @since 3.0
+ */
+@Configuration
+@ComponentScan({"org.hswebframework.web.service.module.simple"
+        , "org.hswebframework.web.controller.module"})
+public class ModuleAutoConfiguration {
+}

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

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