```
public void TestSpring() {
ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
traineeInfoService = ctx.getBean(TraineeInfoService.class);
//
// List<TraineeInfo>traineeInfos = traineeInfoService.getAllTraineeNames();
// System.out.println(traineeInfos);
System.out.println(traineeInfoService.getTraineeInfoById(8L));
((ConfigurableApplicationContext) ctx).close();
}
//
```
网友评论