【增强】一键改包:支持 site、org 等包

This commit is contained in:
YunaiV 2024-04-29 12:51:23 +08:00
parent b1c11f8dd8
commit fe11de8e3c
3 changed files with 8 additions and 6 deletions

View File

@ -12,13 +12,13 @@ import cn.iocoder.yudao.framework.tenant.core.service.TenantFrameworkService;
import cn.iocoder.yudao.framework.web.config.WebProperties; import cn.iocoder.yudao.framework.web.config.WebProperties;
import cn.iocoder.yudao.framework.web.core.filter.ApiRequestFilter; import cn.iocoder.yudao.framework.web.core.filter.ApiRequestFilter;
import cn.iocoder.yudao.framework.web.core.handler.GlobalExceptionHandler; import cn.iocoder.yudao.framework.web.core.handler.GlobalExceptionHandler;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.util.AntPathMatcher; import org.springframework.util.AntPathMatcher;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Objects; import java.util.Objects;

View File

@ -3,7 +3,7 @@ package cn.iocoder.yudao.framework.redis.config;
import cn.hutool.core.util.ReflectUtil; import cn.hutool.core.util.ReflectUtil;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import org.redisson.spring.starter.RedissonAutoConfigurationV2; import org.redisson.spring.starter.RedissonAutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.redis.connection.RedisConnectionFactory;
@ -13,7 +13,7 @@ import org.springframework.data.redis.serializer.RedisSerializer;
/** /**
* Redis 配置类 * Redis 配置类
*/ */
@AutoConfiguration(before = RedissonAutoConfigurationV2.class) // 目的使用自己定义的 RedisTemplate Bean @AutoConfiguration(before = RedissonAutoConfiguration.class) // 目的使用自己定义的 RedisTemplate Bean
public class YudaoRedisAutoConfiguration { public class YudaoRedisAutoConfiguration {
/** /**

View File

@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.web.config.WebProperties;
import com.google.common.collect.HashMultimap; import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap; import com.google.common.collect.Multimap;
import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
@ -36,6 +37,7 @@ import java.util.Set;
* @author 芋道源码 * @author 芋道源码
*/ */
@AutoConfiguration @AutoConfiguration
@AutoConfigureOrder(-1) // 目的先于 Spring Security 自动配置避免一键改包后org.* 基础包无法生效
@EnableMethodSecurity(securedEnabled = true) @EnableMethodSecurity(securedEnabled = true)
public class YudaoWebSecurityConfigurerAdapter { public class YudaoWebSecurityConfigurerAdapter {