package com.neusoft.smart.pos.advertisement;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.redis.core.BoundHashOperations;
import org.springframework.data.redis.core.RedisTemplate;

@SpringCloudApplication
@MapperScan("com.neusoft.smart.pos.*.persistent.mapper")
@ComponentScan("com.neusoft.smart.pos")
public class ServiceAdvertisementApplication {
	
	@Autowired
	private RedisTemplate redisTemplate;
	
	public static void main(String[] args) {
		SpringApplication.run(ServiceAdvertisementApplication.class, args);
	}
	
	@Bean("deviceMediaMap")
	public BoundHashOperations initBoundHashOperations() {
		return redisTemplate.boundHashOps("deviceMediaMap");
	}
	
}
