给迷你服务去掉一些依赖,缩减打包大小

This commit is contained in:
thinkgem
2025-10-15 21:13:38 +08:00
parent 6a41db0efc
commit 9e33b5c894
7 changed files with 85 additions and 56 deletions

View File

@@ -4,16 +4,14 @@
*/
package com.jeesite.modules.config.interceptor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import com.jeesite.common.config.Global;
import com.jeesite.common.lang.StringUtils;
import com.jeesite.modules.sys.interceptor.LogInterceptor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* 后台管理日志记录拦截器
@@ -21,8 +19,7 @@ import com.jeesite.modules.sys.interceptor.LogInterceptor;
* @version 2018年1月10日
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnProperty(name="web.interceptor.log.enabled", havingValue="true", matchIfMissing=true)
@EnableWebMvc
@ConditionalOnProperty(name="web.interceptor.log.enabled", havingValue="true", matchIfMissing=false)
public class LogInterceptorConfig implements WebMvcConfigurer {
@Override

View File

@@ -22,7 +22,6 @@ import com.jeesite.modules.sys.interceptor.MobileInterceptor;
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnProperty(name="web.interceptor.mobile.enabled", havingValue="true", matchIfMissing=false)
@EnableWebMvc
public class MobileViewInterceptorConfig implements WebMvcConfigurer {
@Override

View File

@@ -28,7 +28,7 @@ import java.io.IOException;
* @version 2022-09-27
*/
@Controller
@ConditionalOnProperty(name="file.isFileStreamDown", havingValue="true", matchIfMissing=true)
@ConditionalOnProperty(name={"file.enabled","file.isFileStreamDown"}, havingValue="true", matchIfMissing=true)
@ApiIgnore
public class UserfilesController extends BaseController {

View File

@@ -4,26 +4,24 @@
*/
package com.jeesite.modules.sys.web;
import javax.servlet.http.HttpServletRequest;
import com.jeesite.common.web.BaseController;
import com.jeesite.common.web.http.ServletUtils;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import com.jeesite.common.web.BaseController;
import com.jeesite.common.web.http.ServletUtils;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletRequest;
/**
* 公共标签Controller
* @author ThinkGem
* @version 2017-5-7
* @version 2020-5-7
*/
@Controller
@RequestMapping(value = "tags")
@ConditionalOnProperty(name="web.core.enabled", havingValue="true", matchIfMissing=true)
@ConditionalOnProperty(name={"config.enabled","web.core.enabled"}, havingValue="true", matchIfMissing=true)
@ApiIgnore
public class TagsController extends BaseController {

View File

@@ -198,6 +198,10 @@ page:
# 每页最大条数,防止分页过大导致系统缓慢或内存溢出
maxPageSize: 999
# 基础配置(参数、模块、字典)
config:
enabled: true
# 用户相关
user:
enabled: true