- 浏览: 48086 次
- 性别:
- 来自: 南京
文章分类
- 全部博客 (64)
- codes (9)
- javascript (4)
- servicemix (2)
- maven (2)
- webservice (1)
- docker (1)
- spring (25)
- git (1)
- css (3)
- hadoop (1)
- osgi (2)
- data (3)
- java (6)
- develop (5)
- tomcat (2)
- jvm (1)
- exceptions (3)
- company (0)
- utils (0)
- poi (3)
- 2018 (0)
- notepad (0)
- jquery (1)
- subject (0)
- 行业背景 (0)
- 2019 (0)
- https://blog.csdn.net/u012364631/article/details/47682011 (0)
- idea (0)
最新评论
context=XmlWebApplicationContext
org.springframework.web.context.support
Class XmlWebApplicationContext
java.lang.Object
org.springframework.core.io.DefaultResourceLoader
org.springframework.context.support.AbstractApplicationContext
org.springframework.context.support.AbstractRefreshableApplicationContext
org.springframework.context.support.AbstractRefreshableConfigApplicationContext
org.springframework.web.context.support.AbstractRefreshableWebApplicationContext
org.springframework.web.context.support.XmlWebApplicationContext
All Implemented Interfaces:
Closeable, AutoCloseable, Aware, BeanFactory, BeanNameAware, DisposableBean, HierarchicalBeanFactory, InitializingBean, ListableBeanFactory, ApplicationContext, ApplicationEventPublisher, ConfigurableApplicationContext, Lifecycle, MessageSource, EnvironmentCapable, ResourceLoader, ResourcePatternResolver, ThemeSource, ConfigurableWebApplicationContext, WebApplicationContext
abstractApplicationContext#refresh:
要了解这些方法要做什么,除了代码,最好的方式就是看类或方法上的英文注释
为什么父类中方法互相调用,如果子类重写了会调用子类的方法?
spring环境的抽象-environment
spring为什么既实现了某些接口,又将其作为属性?
spring只是对beanFactory messageSource的封装,表明其有怎样的功能及特性。spring还是调用beanFactory或者messageSource等实现其功能
一般直接在eclipse中立即关闭tomcat有什么影响,会不会有些正在消费的消息未被处理?
参考:
https://yd.baidu.com/view/dc2aa92a9ec3d5bbfc0a741e?cn=6-144,6-708&pn=3
http://blog.csdn.net/szwandcj/article/details/50762990
Spring3.1新属性管理API:PropertySource、Environment、Profile
http://jinnianshilongnian.iteye.com/blog/2000183
Spring中Bean初始化实例【重要】
http://uule.iteye.com/blog/2094609
Spring8:一些常用的Spring Bean扩展接口
http://www.cnblogs.com/xrq730/p/5721366.html
【Spring学习25】容器级启动和关闭回调
http://blog.csdn.net/soonfly/article/details/69916806
5. IoC 容器
http://spring.cndocs.tk/beans.html
http://stackoverflow.com/questions/3924727/managementfactory-getplatformmbeanserver-vs-mbeanserverfactory-creatembeanserv
http://stackoverflow.com/questions/13551408/how-does-lifecycle-interface-work-in-spring-what-are-top-level-singleton-beans
org.springframework.web.context.support
Class XmlWebApplicationContext
java.lang.Object
org.springframework.core.io.DefaultResourceLoader
org.springframework.context.support.AbstractApplicationContext
org.springframework.context.support.AbstractRefreshableApplicationContext
org.springframework.context.support.AbstractRefreshableConfigApplicationContext
org.springframework.web.context.support.AbstractRefreshableWebApplicationContext
org.springframework.web.context.support.XmlWebApplicationContext
All Implemented Interfaces:
Closeable, AutoCloseable, Aware, BeanFactory, BeanNameAware, DisposableBean, HierarchicalBeanFactory, InitializingBean, ListableBeanFactory, ApplicationContext, ApplicationEventPublisher, ConfigurableApplicationContext, Lifecycle, MessageSource, EnvironmentCapable, ResourceLoader, ResourcePatternResolver, ThemeSource, ConfigurableWebApplicationContext, WebApplicationContext
abstractApplicationContext#refresh:
public void refresh() throws BeansException, IllegalStateException { synchronized (this.startupShutdownMonitor) { //这里主要是标示spring为激活状态及开始时间,初始化环境部分在进入refresh()方法之前,大部分已完成 //初始化context的环境environment(environment抽象表示spring环境) //主要有systemEnvironment,systemProperties,servletContext,servletConfig,jndi环境等 //对应于web.xml配置的<context-param><init-param>等标签 //环境实际类为StandardServletEnvironment //environment抽象环境的api从spring3.1开始加入 // Prepare this context for refreshing. prepareRefresh(); //注册容器DefaultListableBeanFactory.beanDefinitionMap //<spring源码学习系列2.1-从xml到document> //<spring源码学习系列2.2-从document到beanDefinition> // Tell the subclass to refresh the internal bean factory. ConfigurableListableBeanFactory beanFactory = obtainFreshBeanFactory(); //beanFactory设置属性,添加后处理器,添加自动装配忽略的接口,自动装配指定值,注册单例(如:environment) //beanFactory自身是不是在singletonObjects里? // Prepare the bean factory for use in this context. prepareBeanFactory(beanFactory); try { //beanFactory添加后置处理器,添加自动装配忽略的接口,注册bean范围,为自动装配指定值,注册单例(如:servletContext,servletConfig,contextAttributes) //跟prepareBeanFactory比较像,对beanFactory进行填充。不过此方法根据英文注释子类覆盖用的,自定义的子类可以覆盖改方法进行一些操作,而上面的prepareBeanFactory是比较通用的。在此环境下是AbstractRefreshableWebApplicationContext重写了postProcessBeanFactory // Allows post-processing of the bean factory in context subclasses. postProcessBeanFactory(beanFactory); //实例化BeanFactoryPostProcessor(getBean)并调用 // Invoke factory processors registered as beans in the context. invokeBeanFactoryPostProcessors(beanFactory); //实例化BeanPostProcessor(getBean)并注册beanPostProcessors // Register bean processors that intercept bean creation. registerBeanPostProcessors(beanFactory); //实例化messageSource(getBean),messageSource这里是context的一个属性 // Initialize message source for this context. initMessageSource(); //实例化applicationEventMulticaster(getBean),applicationEventMulticaster这里是context的一个属性 // Initialize event multicaster for this context. initApplicationEventMulticaster(); //提供了子类实例化其他特殊类,如themeSource。配合<spring:theme>标签使用 // Initialize other special beans in specific context subclasses. onRefresh(); //实例化并注册监听器 //spring的事件也实现了javaapi-EventObject //为什么要放在这个位置,而不是initApplicationEventMulticaster()的下面?它们的关联性更大 // Check for listener beans and register them. registerListeners(); //实例化其他非懒加载的单例bean //<spring源码学习系列2.3-从beanDefinition到instance> // Instantiate all remaining (non-lazy-init) singletons. finishBeanFactoryInitialization(beanFactory); //实例化lifecycleProcessor,并回调smartLifeCycle.onRefresh() //发布刷新完成事件 //注册MBeanServer-JConsole looks at the beans on that server // Last step: publish corresponding event. finishRefresh(); } catch (BeansException ex) { if (logger.isWarnEnabled()) { logger.warn("Exception encountered during context initialization - " + "cancelling refresh attempt: " + ex); } //清除缓存,回调DisposableBean.destory() // Destroy already created singletons to avoid dangling resources. destroyBeans(); // Reset 'active' flag. cancelRefresh(ex); // Propagate exception to caller. throw ex; } } }
要了解这些方法要做什么,除了代码,最好的方式就是看类或方法上的英文注释
为什么父类中方法互相调用,如果子类重写了会调用子类的方法?
spring环境的抽象-environment
spring为什么既实现了某些接口,又将其作为属性?
spring只是对beanFactory messageSource的封装,表明其有怎样的功能及特性。spring还是调用beanFactory或者messageSource等实现其功能
一般直接在eclipse中立即关闭tomcat有什么影响,会不会有些正在消费的消息未被处理?
参考:
https://yd.baidu.com/view/dc2aa92a9ec3d5bbfc0a741e?cn=6-144,6-708&pn=3
http://blog.csdn.net/szwandcj/article/details/50762990
Spring3.1新属性管理API:PropertySource、Environment、Profile
http://jinnianshilongnian.iteye.com/blog/2000183
Spring中Bean初始化实例【重要】
http://uule.iteye.com/blog/2094609
Spring8:一些常用的Spring Bean扩展接口
http://www.cnblogs.com/xrq730/p/5721366.html
【Spring学习25】容器级启动和关闭回调
http://blog.csdn.net/soonfly/article/details/69916806
5. IoC 容器
http://spring.cndocs.tk/beans.html
http://stackoverflow.com/questions/3924727/managementfactory-getplatformmbeanserver-vs-mbeanserverfactory-creatembeanserv
http://stackoverflow.com/questions/13551408/how-does-lifecycle-interface-work-in-spring-what-are-top-level-singleton-beans
发表评论
-
spring疑难解惑-循环依赖的解决
2020-06-17 23:27 485AbstractAutowireCapableBeanFact ... -
spring容器
2019-07-14 08:47 286private final ServletContainer ... -
spring容器
2019-07-13 23:35 0spring容器与springmvc容器 73 ... -
spring源码学习系列2.6-spring ioc原理-codes
2019-03-05 22:56 458web.xml <listener> < ... -
spring源码学习系列3.4-spring mvc原理-codes
2019-01-21 22:46 266本篇章从核心类角度解读springmvc的原理 web.xm ... -
spring源码学习系列4.2-spring aop原理-codes
2018-12-04 22:29 544jdk: Proxy InvocationHandler ... -
spring源码学习系列4.1-spring实现对ibatis的事务管理
2018-09-17 15:44 530事务由spring管理,可以理解为由spring管理数据库连接 ... -
spring源码学习系列4-3种常用的自动代理创建器
2018-09-02 15:48 5463种自动代理器是 AnnotationAwareAspectJ ... -
spring源码学习系列1.2-spring事务代理深入分析2
2018-05-27 19:46 421提示: BeanPostProcessor AopUtils ... -
spring源码学习系列2.5-ApplicationContext初始化-设计模式
2018-05-08 15:17 470ApplicationContext容器的初始化可以通过模板方 ... -
spring源码学习系列3.3-DispatcherServlet初始化-设计模式
2018-05-07 11:12 561springmvc的核心是DispatcherServlet ... -
封装spring-security
2018-01-23 19:33 493github地址: https://github.com/ne ... -
eclipse导入spring源码
2018-05-12 07:20 942spring在git上的项目时gradle管理jar包的,所以 ... -
spring源码学习系列3.2.3-异常页面拦截机制
2017-07-29 19:07 720前序:本文的意义在于了解 tomcat处理异常 请求访问 ... -
spring源码学习系列3.2.2-How to bind String to Date
2017-07-17 12:40 570springmvc开发中,经常需将界面日期数据(String) ... -
spring源码学习系列3.2.1-command对象的绑定
2017-05-28 12:00 926在<spring源码学习系列3.2-handlerAda ... -
spring源码学习系列3.2-handlerAdapter执行
2017-05-28 12:01 383DispatcherServlet#doDispatch中调用 ... -
spring源码学习系列3.1-handlerMapping初始化
2017-05-28 11:56 676SimpleUrlHandlerMapping的继承体系 or ... -
spring源码学习系列2.4-finishRefresh会做什么
2017-05-06 16:36 543spring容器初始化完成后,调用finishRresh 该 ... -
spring源码学习系列3-springmvc原理
2017-05-28 11:56 426问题: springmvc是如何控 ...
相关推荐
Spring源码refresh方法调试笔记,经过的所有的类,和步骤都有记载
spring-cloud-config-svn-refresh:配置中心svn版本示例,客户端refresh版本示例 spring-cloud-config-eureka:配置中心服务化和高可用代码示例 spring-cloud-config-eureka-bus:配置中心和消息总线示例(配置中心...
Ultra-Pull-To-Refresh-With-Load-More使用demo
spring-boot-db初始化测试 测试用例,显示未初始化数据库以进行测试的错误 该项目包含一个测试,该测试查询内存中的h2数据库以确保其不为空 $ mvn test ... 2014-10-14 10:10:21.409 WARN 3435 --- [ main] o.s.b.a....
本次为spring解析配置文件中spring.xml的过程,并且根据解析的spring.xml中的节点加载bean到map中。
Spring Cloud(十)高可用的分布式配置中心 Spring Cloud Config 中使用 Refresh spring-cloud-config-bus-rabbitMQ Spring Cloud(十一)高可用的分布式配置中心 Spring Cloud Bus 消息总线集成(RabbitMQ)
学习系列: - [springcloud(一):大话Spring Cloud](http://www.ityouknow.com/springcloud/2017/05/01/simple-springcloud.html) - [springcloud(二):注册中心Eureka]...
实践方志鹏博客搭建Springcloud+RabbitMQ+Config-client+config-server Eureka-server的微服务架构,通过/bus/refresh接口触发所有config-client自动从config-server重新读取配置文件。SpringCloud和SpringBoot版本...
fsharpbinding-ui-refresh-源码.rar
spring-cloud-config-svn-refresh:配置中心svn版本示例,客户端refresh版本示例 spring-cloud-config-eureka:配置中心服务化和高可用代码示例 spring-cloud-config-eureka-bus:配置中心和消息总线示例(配置中心...
Spring Cloud Config刷新目录Spring Cloud Config自动刷新1.特点从Spring Cloud Config Server添加可配置的“自动”配置功能,并具有可配置的延迟。2.设定为了设置刷新,您必须将休闲依存关系添加到Cloud Config ...
Laravel开发-laravel-refresh-demo 为您的Laravel项目演示提供易于操作的自动刷新包
SpringSecurity-JWT-VERSION2(AccessToken和RefreshToken) version1太复杂,无法优化。accessToken refreshToken流安全登录处理流程详细说明转到博客文章JWT异常处理安全异常处理(AuthenticationEntryPoint,...
vue-pull-refresh vuejs 2.0针对移动设备实现的下拉刷新组件。 演示演示PS:请使用支持Promise用法的浏览器安装vue-pull-refresh vuejs 2.0用于移动设备的下拉刷新组件实现。 演示演示PS:请使用支持Promise用法的...
Super-Auto-Refresh_v2.5.1.crx 谷歌浏览器自动刷新插件 很好用的 具体安装方法很简单:先改后缀成压缩文件解压,然后打开谷歌浏览器更多工具菜单:扩展程序、打开开发者模式、加载已解压的扩展程序,就可以了。
下拉刷新框架:android-Ultra-Pull-To-Refresh 导入AS教程:http://blog.csdn.net/jljcslg/article/details/50543548
该工具类库是从Ultra-pull-to-refresh中抽取出来的相关代码,实现的类库。该类库为Ecplise版本,直接导入到Ecplise中并依赖即可
iscroll-5-pull-to-refresh-and-infinite,可以直接拿来用的下拉刷新,上拉加载
配置中心git版本示例:配置中心svn版本示例,客户端refresh版本示例:配置中心服务化和高可用代码示例:配置中心和消息总线示例(配置中心终结版)gateway-service-zuul:Spring Cloud Zuul使用初级篇 网关 均衡负载...
Pull-to-Refresh.Rentals-Android开源代码,github上的不能直接在Android上面运行,故整理好的,可以直接运行。