@Override
	public void afterPropertiesSet() throws Exception {
		ApplicationContextHelper.setApplicationContext(getApplicationContext());
		// 执行初始化
		EntityContainer.init();
		if (servers != null && servers.size() > 0) {
			for (String item : servers) {
				String infos[] = item.split(",");
				if (infos != null && infos.length == 3) {
					JdbcTemplate t = new JdbcTemplate();
					t.setDataSource((DataSource)getApplicationContext().getBean(infos[2]));
					mapping.put(infos[0], t);
					if ("R".equals(infos[1])) {
						readers.add(t);
						readerCount++;
					} else if ("W".endsWith(infos[1])) {
						writers.add(t);
						writerCount++;
					} else {
						defaultTemplate = t;
					}
					if (defaultTemplate == null) {// 默认取第一个
						defaultTemplate = t;
					}
				}
			}
		}
		DatabaseRouterFactory.addRouter(this);
	}