diff --git a/modules/core/src/main/java/com/jeesite/modules/sys/web/AreaController.java b/modules/core/src/main/java/com/jeesite/modules/sys/web/AreaController.java index f9619b28..6d85547e 100644 --- a/modules/core/src/main/java/com/jeesite/modules/sys/web/AreaController.java +++ b/modules/core/src/main/java/com/jeesite/modules/sys/web/AreaController.java @@ -8,6 +8,7 @@ import java.util.Map; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.annotation.Validated; @@ -34,6 +35,7 @@ import com.jeesite.modules.sys.utils.UserUtils; */ @Controller @RequestMapping(value = "${adminPath}/sys/area") +@ConditionalOnProperty(name="web.core.enabled", havingValue="true", matchIfMissing=true) public class AreaController extends BaseController { @Autowired diff --git a/modules/core/src/main/java/com/jeesite/modules/sys/web/CompanyController.java b/modules/core/src/main/java/com/jeesite/modules/sys/web/CompanyController.java index e4b7315d..49582dae 100644 --- a/modules/core/src/main/java/com/jeesite/modules/sys/web/CompanyController.java +++ b/modules/core/src/main/java/com/jeesite/modules/sys/web/CompanyController.java @@ -11,6 +11,7 @@ import javax.servlet.http.HttpServletResponse; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.annotation.Validated; @@ -39,6 +40,7 @@ import com.jeesite.modules.sys.utils.UserUtils; */ @Controller @RequestMapping(value = "${adminPath}/sys/company") +@ConditionalOnProperty(name="web.core.enabled", havingValue="true", matchIfMissing=true) public class CompanyController extends BaseController { @Autowired diff --git a/modules/core/src/main/java/com/jeesite/modules/sys/web/LogController.java b/modules/core/src/main/java/com/jeesite/modules/sys/web/LogController.java index d9b6c135..1a580679 100644 --- a/modules/core/src/main/java/com/jeesite/modules/sys/web/LogController.java +++ b/modules/core/src/main/java/com/jeesite/modules/sys/web/LogController.java @@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletResponse; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; @@ -29,6 +30,7 @@ import com.jeesite.modules.sys.service.LogService; */ @Controller @RequestMapping(value = "${adminPath}/sys/log") +@ConditionalOnProperty(name="web.core.enabled", havingValue="true", matchIfMissing=true) public class LogController extends BaseController { @Autowired diff --git a/modules/core/src/main/java/com/jeesite/modules/sys/web/OfficeController.java b/modules/core/src/main/java/com/jeesite/modules/sys/web/OfficeController.java index ce8db414..84e76f9e 100644 --- a/modules/core/src/main/java/com/jeesite/modules/sys/web/OfficeController.java +++ b/modules/core/src/main/java/com/jeesite/modules/sys/web/OfficeController.java @@ -8,6 +8,7 @@ import java.util.Map; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.annotation.Validated; @@ -35,6 +36,7 @@ import com.jeesite.modules.sys.web.user.EmpUserController; */ @Controller @RequestMapping(value = "${adminPath}/sys/office") +@ConditionalOnProperty(name="web.core.enabled", havingValue="true", matchIfMissing=true) public class OfficeController extends BaseController { @Autowired diff --git a/modules/core/src/main/java/com/jeesite/modules/sys/web/OnlineController.java b/modules/core/src/main/java/com/jeesite/modules/sys/web/OnlineController.java index db6b014d..a76a9b9f 100644 --- a/modules/core/src/main/java/com/jeesite/modules/sys/web/OnlineController.java +++ b/modules/core/src/main/java/com/jeesite/modules/sys/web/OnlineController.java @@ -17,6 +17,7 @@ import org.apache.shiro.session.Session; import org.apache.shiro.subject.PrincipalCollection; import org.apache.shiro.subject.support.DefaultSubjectContext; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; @@ -41,6 +42,7 @@ import com.jeesite.modules.sys.utils.UserUtils; */ @Controller @RequestMapping(value = "${adminPath}/sys/online") +@ConditionalOnProperty(name="web.core.enabled", havingValue="true", matchIfMissing=true) public class OnlineController extends BaseController{ @Autowired diff --git a/modules/core/src/main/java/com/jeesite/modules/sys/web/PostController.java b/modules/core/src/main/java/com/jeesite/modules/sys/web/PostController.java index e83f2d30..56bda545 100644 --- a/modules/core/src/main/java/com/jeesite/modules/sys/web/PostController.java +++ b/modules/core/src/main/java/com/jeesite/modules/sys/web/PostController.java @@ -8,6 +8,7 @@ import javax.servlet.http.HttpServletResponse; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.annotation.Validated; @@ -29,6 +30,7 @@ import com.jeesite.modules.sys.service.PostService; */ @Controller @RequestMapping(value = "${adminPath}/sys/post") +@ConditionalOnProperty(name="web.core.enabled", havingValue="true", matchIfMissing=true) public class PostController extends BaseController { @Autowired diff --git a/modules/core/src/main/java/com/jeesite/modules/sys/web/user/AccountController.java b/modules/core/src/main/java/com/jeesite/modules/sys/web/user/AccountController.java index 2d1ebec9..4d7174d4 100644 --- a/modules/core/src/main/java/com/jeesite/modules/sys/web/user/AccountController.java +++ b/modules/core/src/main/java/com/jeesite/modules/sys/web/user/AccountController.java @@ -9,6 +9,7 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PostMapping; @@ -34,6 +35,7 @@ import com.jeesite.modules.sys.utils.ValidCodeUtils; */ @Controller @RequestMapping(value = "/account") +@ConditionalOnProperty(name="web.core.enabled", havingValue="true", matchIfMissing=true) public class AccountController extends BaseController{ @Autowired diff --git a/modules/core/src/main/java/com/jeesite/modules/sys/web/user/CorpAdminController.java b/modules/core/src/main/java/com/jeesite/modules/sys/web/user/CorpAdminController.java index 2eef3266..cd2bb132 100644 --- a/modules/core/src/main/java/com/jeesite/modules/sys/web/user/CorpAdminController.java +++ b/modules/core/src/main/java/com/jeesite/modules/sys/web/user/CorpAdminController.java @@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletResponse; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.annotation.Validated; @@ -35,6 +36,7 @@ import com.jeesite.modules.sys.utils.UserUtils; */ @Controller @RequestMapping(value = "${adminPath}/sys/corpAdmin") +@ConditionalOnProperty(name="web.core.enabled", havingValue="true", matchIfMissing=true) public class CorpAdminController extends BaseController { @Autowired diff --git a/modules/core/src/main/java/com/jeesite/modules/sys/web/user/EmpUserController.java b/modules/core/src/main/java/com/jeesite/modules/sys/web/user/EmpUserController.java index da832d53..420ef9f3 100644 --- a/modules/core/src/main/java/com/jeesite/modules/sys/web/user/EmpUserController.java +++ b/modules/core/src/main/java/com/jeesite/modules/sys/web/user/EmpUserController.java @@ -13,6 +13,7 @@ import org.apache.shiro.authz.annotation.Logical; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.annotation.Validated; @@ -54,6 +55,7 @@ import com.jeesite.modules.sys.utils.UserUtils; */ @Controller @RequestMapping(value = "${adminPath}/sys/empUser") +@ConditionalOnProperty(name="web.core.enabled", havingValue="true", matchIfMissing=true) public class EmpUserController extends BaseController { @Autowired diff --git a/modules/core/src/main/java/com/jeesite/modules/sys/web/user/SecAdminController.java b/modules/core/src/main/java/com/jeesite/modules/sys/web/user/SecAdminController.java index 7e529a38..06f37029 100644 --- a/modules/core/src/main/java/com/jeesite/modules/sys/web/user/SecAdminController.java +++ b/modules/core/src/main/java/com/jeesite/modules/sys/web/user/SecAdminController.java @@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletResponse; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.annotation.Validated; @@ -32,6 +33,7 @@ import com.jeesite.modules.sys.service.UserService; */ @Controller @RequestMapping(value = "${adminPath}/sys/secAdmin") +@ConditionalOnProperty(name="web.core.enabled", havingValue="true", matchIfMissing=true) public class SecAdminController extends BaseController { @Autowired diff --git a/modules/core/src/main/resources/config/jeesite-core.yml b/modules/core/src/main/resources/config/jeesite-core.yml index 39a19a13..f1875be0 100644 --- a/modules/core/src/main/resources/config/jeesite-core.yml +++ b/modules/core/src/main/resources/config/jeesite-core.yml @@ -179,9 +179,19 @@ user: registerUser: enabled: false userTypes: 0, 1 + +# 菜单管理 +menu: + # 根据模块状态去更新相连的菜单状态(仅作为微服务时设为false) + updateStatusByModuleStatus: true + +# 国际化管理(专业版+) +lang: + enabled: true # 任务调度(个人版+) job: + enabled: true # 是否自动启动任务调度(可关闭) autoStartup: true @@ -396,6 +406,10 @@ web: validator: id: '[a-zA-Z0-9_\-/\u4e00-\u9fa5]{0,64}' user.loginCode: '[a-zA-Z0-9_\u4e00-\u9fa5]{4,20}' + + # 关闭核心模块的Web功能(仅作为微服务时设为false) + core: + enabled: true # 错误页面500.html是否输出错误信息(正式环境,为提供安全性可设置为false) error: diff --git a/web/src/main/resources/config/jeesite.yml b/web/src/main/resources/config/jeesite.yml index e61a2aac..5212ba54 100644 --- a/web/src/main/resources/config/jeesite.yml +++ b/web/src/main/resources/config/jeesite.yml @@ -14,12 +14,6 @@ copyrightYear: 2018 #是否演示模式 demoMode: false -#是否小程序 -miniService: true - -#是否小程序 -miniConfig: true - #============================# #===== Database sttings =====# #============================# @@ -208,8 +202,18 @@ jdbc: # # 多租户模式(SAAS模式)(专业版) # useCorpModel: false +# 菜单管理 +#menu: +# # 根据模块状态去更新相连的菜单状态(仅作为微服务时设为false) +# updateStatusByModuleStatus: true + +# 国际化管理(专业版+) +#lang: +# enabled: true + # 任务调度(个人版+) #job: +# enabled: true # # # 是否自动启动任务调度(可关闭) # autoStartup: true @@ -385,6 +389,16 @@ jdbc: # # # 静态文件后缀,排除的url路径,指定哪些uri路径不进行静态文件过滤。 # staticFileExcludeUri: /druid/ +# +# # 自定义正则表达式验证(主键、登录名) +# validator: +# id: '[a-zA-Z0-9_\-/\u4e00-\u9fa5]{0,64}' +# user.loginCode: '[a-zA-Z0-9_\u4e00-\u9fa5]{4,20}' +# +# # 关闭核心模块的Web功能(仅作为微服务时设为false) +# core: +# enabled: true + # # 错误页面500.html是否输出错误信息(正式环境,为提供安全性可设置为false) #error: