| @@ -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; | ||||
| @@ -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; | ||||
| @@ -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,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; | ||||
| /** | /** | ||||