@Target(value=TYPE) @Retention(value=RUNTIME) @Import(value=DubboCacheFilter.class) @ConditionalOnClass(value=org.apache.dubbo.config.annotation.Service.class) @AutoConfigureRedisson @AutoConfigureAfter(value=AppConfigurationProperties.class) @Documented public @interface AutoConfigureDubboCacheProxy
@Slf4j
@org.springframework.stereotype.Service
@org.apache.dubbo.config.annotation.Service
public class UserServiceImpl implements UserService, ICacheService<UserCacheServiceImpl> {
// ...
}
UserCacheServiceImpl:
@Slf4j
@org.springframework.stereotype.Service
public class UserServiceImpl extends UserServiceImpl {
// 实现需要缓存数据和从缓存获取数据的方法
}
Copyright © 2022. All rights reserved.