package com.jw.app.datatest;

import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Properties;

import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;

import com.gaowj.business.action.BasicAction;
import com.gaowj.business.comp.BusinessFactory;
import com.gaowj.business.comp.BusinessManager;
import com.jw.app.business.UserTestBusiness;

public class TestData {

	public static void main(String [] args) {
    	String resource = "/jwmagicIdentity/WebContent/WEB-INF/conf/gaowj/bl/proxool.xml";
    	try {
			InputStream inputStream = Resources.getResourceAsStream(resource);
			BusinessFactory factory = new BusinessFactory() {
				
				@Override
				public void init(Properties arg0) {
					// TODO Auto-generated method stub
					
				}
				
				@Override
				public <T> T getBusiness(Class<T> arg0) {
					// TODO Auto-generated method stub
					return null;
				}
				
				@Override
				public void destroy() {
					// TODO Auto-generated method stub
					
				}
			};
			BusinessManager.init(factory);
			
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	/*	UserTestBusiness business = BusinessManager.getBusiness(UserTestBusiness.class);
		//List<Map<String, Object>> listData = business.selectUnitTest();
		List<String> list = new ArrayList<String>();
		for (Map<String, Object> m : listData) {
			list.add((String) m.get("UNIT_ID"));
			System.out.println(list);
		}*/
	}
}
