Spring运行时序图
2022-08-28 15:29:20 32 举报
Spring运行时序图
作者其他创作
大纲/内容
stmt.executereadony conn.setAutoCommit(true)conn.setAutoCommit(false)
handleInternal
Socket
processLocalProperty
初始化阶段
Loop
执行事务
IoC部分
getHandlerAdapter
getModelAndView
conn.rollback()
执行
odbc
ReflectiveMethodInvocation
ClassPathXmlApplicationContext
结束
AbstractApplicationContext
render
SocketServer 3306MySQL服务器
SQLServer
ProxyFactory
定位
applyBeanPostProcessorsAfterInitialization
setValue
getHandler
findEligibleAdvisors
JdbcConnetion
ConnectionPool
运行(调用)阶段
getProxy
doService
onRefresh
initializeBean()
sort
返回具体Proxy
DI部分
applyPropertyValues
持久化
getBean()
BeanWrapperImpl
before
createBean
processDispatchResult
回调通知
registerBeanDefinition
registerBeanDefinitions
内存区域
AbstractHandlerMapping
DefaultListableBeanFactory
DispatcherServlet
Acdess
AbstractNestablePropertyAccessor
返回具体Proxy,比如JdkDynamicAopProxy
正常执行
refresh()
setPropertyValue
AbstractView
DataSource
BeforeInterceptorbefore()
SQL语句(通信协议)报文格式DML(数据操作语言)SELECTUPDATADELETEINSERT
conn.commit()
AbstractXmlApplicationContext
after
BeanDefinitionReaderUtils
实例化
ThrowingInterceptorafterThrow()
DefaultAopProxyFactory
AbstractHandlerMethodAdapter
BeanDefinitionParserDelegate
AfterInterceptorafter()
invoke()
exectuecommitrollbackclose
AfterReturningAdviceInterceptor
构造方法
getInterceptorsAndDynamicInterceptionAdvice
HttpServletBean
XmlBeanDefinitionReader
refreshBeanFactory
name
addr
age
CMD
1
Mic
Hunan Changsha
17
UPDATE
refresh
AbstractAdvisorAutoProxyCreator
loadBeanDefinitions
init()
断网、业务报错断电、机器故障
Connection
返回ModelAndView
initWebApplicationContext
beanDefinitionMap
18
MySQL
getAdvicesAndAdvisorsForBean
RequestMappingHandlerAdapter
AnnotationAwareOrderComparator
调用render()方法,通过response输出到浏览器
Oralce
AbstractRefreshableConfigApplicationContext
obtainFreshBeanFactory()
DefaultBeanDefinitionDocumentReader
AbstractPropertyAccessor
handle
AbstractAutowireCapableBeanFactory
MethodBeforeAdviceInterceptor
AdvisedSupport
创建代理类
invokeHandlerMethod
instantiate
AOP部分
ApplicationContext
wrapIfNecessary
doGetBean()
populateBean
临时表UPDATE MEMBER SET age = age-1 WHERE name = Mic1.执行SELECT,将满足条件的数据找出来放到内存中2.对数据进行操作,并检查有没有错误3.如果没有错误,就会写入持久化空间4.如果有错误,就会返回异常错误码,并且终止持久化操作5.将结果返回给客户端
代码织入(invoke)
currentInterceptorIndex
doRegisterBeanDefinitions
FrameworkServlet
doDispatch
createProxy
initStrategies
注册
createAopProxy
MVC部分
log
依赖注入
AbstractAutoProxyCreator
AbstractBeanFactory
...
开启事务
回滚
initServletBean
提交事务
createBeanInstance
setConfigLocations
proceed
磁盘存储区域
返回HandlerExecutionChain
DB2
SimpleInstantiationStrategy
发生异常
JdkDynamicAopProxy
返回拦截器链
configureAndRefreshWebApplicationContext()
加载
0 条评论
回复 删除
下一页