
spring
森林森
java学习
展开
-
手动实现IOC与事务控制-JDBC-4-基于自定义注解
基于之前的添加pom文件 <!--反射工具包--> <dependency> <groupId>org.reflections</groupId> <artifactId>reflections</artifactId> <version>0.9.12</version> </dependency> <!--工具包-->原创 2020-07-01 12:15:30 · 172 阅读 · 0 评论 -
Spring Bean初始化流程图
原创 2020-06-30 10:54:07 · 440 阅读 · 0 评论 -
spring-iocBean实例化的流程
public void refresh() throws BeansException, IllegalStateException { /** * 加锁,说明并发执行,很多地方都有调用 * registerShutdownHook 也调用了 * close()方法也调有了, * 容器在启动时,不能调Close的方法 */ synchronized (this.startupShutdownMonitor) { // Prepare this context f.原创 2020-06-29 13:51:14 · 255 阅读 · 0 评论 -
spring-refresh()方法中ConfigurableListableBeanFactory beanFactory 创建流程Bean加载注册的流程
@Override public void refresh() throws BeansException, IllegalStateException { /** * 加锁,说明并发执行,很多地方都有调用 * registerShutdownHook 也调用了 * close()方法也调有了, * 容器在启动时,不能调Close的方法 */ synchronized (this.startupShutdownMonitor) { // Prepare this原创 2020-06-28 21:27:26 · 2619 阅读 · 0 评论 -
Spring iOC主流程初始化方法org.springframework.context.support.AbstractApplicationContext#refresh方法
Spring iOC主流程初始化方法org.springframework.context.support.AbstractApplicationContext#refresh方法##### 启动测试类 @Test public void beanTest(){ ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");原创 2020-06-28 19:50:48 · 9107 阅读 · 0 评论 -
Spring Bean生命周期
定义类与public class Result implements Serializable , BeanNameAware, BeanFactoryAware , ApplicationContextAware, InitializingBean, DisposableBean { private static final long serialVersionUID = -645547982453859521L; private Integer status;原创 2020-06-28 11:02:30 · 116 阅读 · 0 评论 -
web.xml配置注解启动
@Configuration@ComponentScan(basePackages = "com.liu.spring.xml")public class SpringConfig {}web.xml配置<!--告诉ContextLoaderListener使用注解--> <context-param> <param-name>contextClass</param-name> <param-.原创 2020-06-24 21:40:56 · 604 阅读 · 0 评论 -
Servlet API
原创 2019-05-11 19:44:19 · 99 阅读 · 0 评论 -
Spring 中DispatcherServlet初始化过程
Spring 初始化过程Spring 初始化过程javax.servlet.Servlet#public void init(ServletConfig config) 方法public interface Servlet { public void init(ServletConfig config) throws ServletException;}javax.ser...原创 2019-05-10 14:17:24 · 858 阅读 · 0 评论 -
Spring Web MVC Rest处理流程(转)
原文:https://www.imooc.com/t/5387391转载 2019-05-10 12:23:24 · 349 阅读 · 0 评论 -
解决idea JSP路径错误问题
package com.ghgcn.springboot_view.config;import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;import org.springframework.boot.web.server.WebServerFactoryCustomizer;imp...原创 2019-05-09 16:02:00 · 2370 阅读 · 0 评论