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

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.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.cors.CorsConfiguration;
@@ -50,9 +51,11 @@ public class WebConfig implements WebMvcConfigurer {
@Autowired
private CurrentTenantInterceptor tenantInterceptor;

@Lazy
@Autowired
private MallResourceService mallResourceService;

@Lazy
@Autowired
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

@Component
public class WechatMpConfig {

@Lazy
@Autowired
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.reflect.MethodSignature;
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.ValueOperations;
import org.springframework.stereotype.Component;
@@ -43,12 +44,15 @@ public class RedisCacheAspect {
*/
private static final String DELIMITER_KEY = ":";

@Lazy
@Autowired
private StringRedisTemplate stringRedisTemplate;

@Lazy
@Autowired
RedisLock redisLock;

@Lazy
@Autowired
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.crazycake.shiro.RedisSessionDAO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;

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


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