加载dao层 使用class,加载service 使用implement
public class text1 {
private static ApplicationContext context;
public static void main(String[] args) throws Exception {
context = new ClassPathXmlApplicationContext("spring/spring-context.xml");
PreparedDaoImpl dao = (PreparedDaoImpl) context.getBean("preparedDaoImpl");
List<Prepared> list = dao.getList("2018-01-01", "2018-01-31");
List<PreparedList> t1 = new ArrayList<PreparedList>();
for (int i = 0; i < list.size(); i++) {
Prepared prepared = list.get(i);
Modulus modulus = dao.getmarkByItem(prepared.getfNumber());
PreparedList list2 = new PreparedList(prepared, modulus);
t1.add(list2);
}
Map<String, ShowTotalPerpared> showList = ConfigUtil.getShowList(t1);
System.out.println(showList);
}
}