/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights reserved. <a>http://www.crunii.com</a>
 */
package com.crunii.micro.domain.config;

import com.crunii.micro.domain.service.CurrWorkerService;
import com.crunii.micro.domain.service.impl.CurrWorkerServiceImpl;
import com.crunii.micro.platform.jdbc.LogUrlJdbcDao;
import com.crunii.micro.platform.jdbc.TemplateJdbcDao;
import com.crunii.micro.platform.service.LogUrlService;
import com.crunii.micro.platform.service.TemplateService;
import com.crunii.micro.platform.service.impl.LogUrlServiceImpl;
import com.crunii.micro.platform.service.impl.TemplateServiceImpl;
import org.redisson.spring.starter.RedissonAutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * <pre>依赖电信的ctgcache</pre>
 *
 * @author 田平 create 2019年12月4日下午5:03:05
 */
@Configuration
@ConditionalOnProperty(name = "spring.redis.password")
@AutoConfigureAfter(RedissonAutoConfiguration.class)
public class DomainDepCacheConfig {

	@Bean
	public CurrWorkerService regCurrWorkerService() {
		return new CurrWorkerServiceImpl();
	}

	@Bean
	public LogUrlJdbcDao regLogUrlJdbcDao() {
		return new LogUrlJdbcDao();
	}

	@Bean
	public LogUrlService regLogUrlService() {
		return new LogUrlServiceImpl();
	}

	@Bean
	public TemplateJdbcDao regTempJdbcDao() {
		return new TemplateJdbcDao();
	}

	@Bean
	public TemplateService regTempService() {
		return new TemplateServiceImpl();
	}

}
