Просмотр исходного кода

fix 循环依赖

release_toaliyun_real
winter 4 лет назад
Родитель
Сommit
73daaec9fd
4 измененных файлов: 16 добавлений и 0 удалений
  1. +3
    -0
      mallinkAdmin/src/main/java/com/iformall/config/WebConfig.java
  2. +2
    -0
      mallinkAdmin/src/main/java/com/iformall/config/WechatMpConfig.java
  3. +4
    -0
      mallinkBApi/src/main/java/com/iformall/aop/RedisCacheAspect.java
  4. +7
    -0
      mallinkCallback/src/main/java/com/iformall/shiro/ShiroService.java

+ 3
- 0
mallinkAdmin/src/main/java/com/iformall/config/WebConfig.java Просмотреть файл

@@ -20,6 +20,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;
import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.CorsConfiguration;
@@ -50,9 +51,11 @@ public class WebConfig implements WebMvcConfigurer {
@Autowired @Autowired
private CurrentTenantInterceptor tenantInterceptor; private CurrentTenantInterceptor tenantInterceptor;


@Lazy
@Autowired @Autowired
private MallResourceService mallResourceService; private MallResourceService mallResourceService;


@Lazy
@Autowired @Autowired
private AliyunOSS aliyunOSS; private AliyunOSS aliyunOSS;




+ 2
- 0
mallinkAdmin/src/main/java/com/iformall/config/WechatMpConfig.java Просмотреть файл

@@ -6,11 +6,13 @@ import me.chanjar.weixin.mp.config.WxMpConfigStorage;
import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl; import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;


@Component @Component
public class WechatMpConfig { public class WechatMpConfig {


@Lazy
@Autowired @Autowired
private WechatWebProperties wechatWebProperties; private WechatWebProperties wechatWebProperties;




+ 4
- 0
mallinkBApi/src/main/java/com/iformall/aop/RedisCacheAspect.java Просмотреть файл

@@ -17,6 +17,7 @@ import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature; import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.core.ValueOperations; import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@@ -43,12 +44,15 @@ public class RedisCacheAspect {
*/ */
private static final String DELIMITER_KEY = ":"; private static final String DELIMITER_KEY = ":";


@Lazy
@Autowired @Autowired
private StringRedisTemplate stringRedisTemplate; private StringRedisTemplate stringRedisTemplate;


@Lazy
@Autowired @Autowired
RedisLock redisLock; RedisLock redisLock;


@Lazy
@Autowired @Autowired
private WxBuserTokenService userTokenService; private WxBuserTokenService userTokenService;




+ 7
- 0
mallinkCallback/src/main/java/com/iformall/shiro/ShiroService.java Просмотреть файл

@@ -7,6 +7,7 @@ import org.apache.shiro.web.filter.mgt.PathMatchingFilterChainResolver;
import org.apache.shiro.web.servlet.AbstractShiroFilter; import org.apache.shiro.web.servlet.AbstractShiroFilter;
import org.crazycake.shiro.RedisSessionDAO; import org.crazycake.shiro.RedisSessionDAO;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;


import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
@@ -16,10 +17,16 @@ import java.util.Map;
*/ */
//@Service //@Service
public class ShiroService { public class ShiroService {
@Lazy
@Autowired @Autowired
private ShiroFilterFactoryBean shiroFilterFactoryBean; private ShiroFilterFactoryBean shiroFilterFactoryBean;
@Lazy
@Autowired @Autowired
private MallPermissionService resourcesService; private MallPermissionService resourcesService;
@Lazy
@Autowired @Autowired
private RedisSessionDAO redisSessionDAO; private RedisSessionDAO redisSessionDAO;
/** /**


Загрузка…
Отмена
Сохранить