spring in action: 第一章

2018-05-05  本文已影响0人  JavaLearner

Spring之旅

心得

看来学习spring的最好方式是调试书里的代码,并且看懂每一行。

ClassPathXmlApplicationContext: 是从xml配置文件中获得bean
AnnotationConfigApplicationContext: 是从一个或多个基于java的配置类中加载spring应用

ClassPathXmlApplicationContext("META-INF/spring/knight.xml");
AnnotationConfigApplicationContext(KnightConfig.class)

spring aop:

自己以前一直觉得这些东西应该显示的写出来,看了spring之后觉得aop确实也是有用的。
作为一个C++程序员确实是大开眼界。

spring jdbc template

确实是少写了很多代码,非常有必须要的,跟mybatis比起来还是要麻烦一些,已经比首先代码要好很多了。

idea

idea:展示类图


image.png
上一篇 下一篇

猜你喜欢

热点阅读