潘志宝
5 天以前 7fce3006ecd0b670e33c2d3ba123778e79e2e943
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package com.iailab.framework.signature.config;
 
import com.iailab.framework.redis.config.IailabRedisAutoConfiguration;
import com.iailab.framework.signature.core.aop.ApiSignatureAspect;
import com.iailab.framework.signature.core.redis.ApiSignatureRedisDAO;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.data.redis.core.StringRedisTemplate;
 
/**
 * HTTP API 签名的自动配置类
 *
 * @author Zhougang
 */
@AutoConfiguration(after = IailabRedisAutoConfiguration.class)
public class IailabApiSignatureAutoConfiguration {
 
    @Bean
    public ApiSignatureAspect signatureAspect(ApiSignatureRedisDAO signatureRedisDAO) {
        return new ApiSignatureAspect(signatureRedisDAO);
    }
 
    @Bean
    public ApiSignatureRedisDAO signatureRedisDAO(StringRedisTemplate stringRedisTemplate) {
        return new ApiSignatureRedisDAO(stringRedisTemplate);
    }
 
}