houzhongyi
2024-07-11 e7c1260db32209a078a962aaa0ad5492c35774fb
提交 | 用户 | 时间
e7c126 1 package com.iailab.framework.signature.config;
H 2
3 import com.iailab.framework.redis.config.IailabRedisAutoConfiguration;
4 import com.iailab.framework.signature.core.aop.ApiSignatureAspect;
5 import com.iailab.framework.signature.core.redis.ApiSignatureRedisDAO;
6 import org.springframework.boot.autoconfigure.AutoConfiguration;
7 import org.springframework.context.annotation.Bean;
8 import org.springframework.data.redis.core.StringRedisTemplate;
9
10 /**
11  * HTTP API 签名的自动配置类
12  *
13  * @author Zhougang
14  */
15 @AutoConfiguration(after = IailabRedisAutoConfiguration.class)
16 public class IailabApiSignatureAutoConfiguration {
17
18     @Bean
19     public ApiSignatureAspect signatureAspect(ApiSignatureRedisDAO signatureRedisDAO) {
20         return new ApiSignatureAspect(signatureRedisDAO);
21     }
22
23     @Bean
24     public ApiSignatureRedisDAO signatureRedisDAO(StringRedisTemplate stringRedisTemplate) {
25         return new ApiSignatureRedisDAO(stringRedisTemplate);
26     }
27
28 }