package com.zhiwei.manage.handle;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import javax.annotation.Resource;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Service;

@Service("firstRun")
public class DbDepot {

	@Resource(name = "mongoTemplate")
	private MongoTemplate mongo;
	public static ConcurrentMap<String, Object> dbCons;
	public static ConcurrentMap<String, Object> newsCol;
	public static ConcurrentMap<String, Object> dataCol;
	public static int month = 0;
	private static final Log log = LogFactory.getLog(DbDepot.class);

	public void init() {
		log.info("数据连接map初始化");
		dataCol = new ConcurrentHashMap<String, Object>();
		dbCons = new ConcurrentHashMap<String, Object>();
		newsCol = new ConcurrentHashMap<String, Object>();
		System.out.println("连接初始化成功");
	}
}
