Spring
weixin_41627757
这个作者很懒,什么都没留下…
展开
-
Spring doCreateBean 方法解析
大纲理解先通过反射创建实例再给属性赋值调用相关初始化方法首先看下doGetBean的方法 /** * 返回一个Bean * * Return an instance, which may be shared or independent, of the specified bean. * @param name the name of the bean to retrieve原创 2020-10-11 19:45:18 · 688 阅读 · 0 评论 -
Spring init Bean
总结:Spring init Bean之前,已经将Bean properties完成设值; /** * Initialize the given bean instance, applying factory callbacks * as well as init methods and bean post processors. * <p>Called from {@link #createBean} for traditionally defined beans, *原创 2020-10-11 15:27:55 · 139 阅读 · 0 评论 -
理解Spring框架
正常情况下:一个类产生了对象,才可以使用对象的方法;如果是在很多地方使用该对象就要使用new关键字,产生了很多的耦合;所以框架Spring框架能给我们帮助的就是只需要产生一个这样的对象,在使用的地方进行注入就可以了;那现在面临两个问题,对象哪里来?对象如何被注入?这两个问题,就是框架要解决的事情;对象通过工厂来进行创建注入就是依赖注入,通过@autowired方式要创建对象,必须通过工厂来创建,如果保证只要一个工厂就可以创建所有的对象呢?所有是通过反射,反射必然要有类的全限.原创 2020-10-11 15:27:11 · 150 阅读 · 0 评论 -
springmvc
3、SpringMVC工作原理?答:1)客户端发送请求到DispatcherServlet2)DispatcherServlet查询handlerMapping找到处理请求的Controller3)Controller调用业务逻辑后,返回ModelAndView4)DispatcherServlet查询ModelAndView,找到指定视图5)视图将结果返回到客户端4、SpringM...原创 2020-03-14 12:28:45 · 98 阅读 · 0 评论