随笔分类 -  Spring

Spring 钩子之BeanFactoryPostProcessor和BeanPostProcessor的源码学习,FactoryBean
摘要:BeanFactoryPostProcessor 是用于增强BeanFactory的(例如可以增强beanDefination), BeanPostProcessor是用于增强bean的,而FactoryBean是一个bean,一般用于创建复杂的bean refer: https://www.jia 阅读全文

posted @ 2020-11-08 10:41 卖肾割阑尾 阅读(79) 评论(0) 推荐(0)

Spring Bean的生命周期
摘要:Spring – Bean Life Cycle refer:https://howtodoinjava.com/spring-core/spring-bean-life-cycle/ 阅读全文

posted @ 2020-06-23 15:25 卖肾割阑尾 阅读(113) 评论(0) 推荐(0)

Wiring in Spring: @Autowired, @Resource and @Inject 区别
摘要:refer:https://www.baeldung.com/spring-annotations-resource-inject-autowire 主要是查找顺序不一致: @Resource Match by Name Match by Type Match by Qualifier 优先匹配Na 阅读全文

posted @ 2020-06-23 15:12 卖肾割阑尾 阅读(124) 评论(0) 推荐(0)

Spring Bean的生命周期(非常详细)
摘要:参考:https://www.cnblogs.com/zrtqsk/p/3735273.html https://www.zhihu.com/question/38597960 阅读全文

posted @ 2020-06-15 11:36 卖肾割阑尾 阅读(126) 评论(0) 推荐(0)

AOP的底层实现-CGLIB动态代理和JDK动态代理
摘要:AOP是目前Spring框架中的核心之一,在应用中具有非常重要的作用,也是Spring其他组件的基础。它是一种面向切面编程的思想。关于AOP的基础知识,相信多数童鞋都已经了如指掌,我们就略过这部分,来讲解下AOP的核心功能的底层实现机制:如何用动态代理来实现切面拦截。 AOP的拦截功能是由java中 阅读全文

posted @ 2020-03-27 14:25 卖肾割阑尾 阅读(147) 评论(0) 推荐(0)

Spring中WebApplicationInitializer的理解
摘要:现在JavaConfig配置方式在逐步取代xml配置方式。而WebApplicationInitializer可以看做是Web.xml的替代,它是一个接口。通过实现WebApplicationInitializer,在其中可以添加servlet,listener等,在加载Web项目的时候会加载这个接 阅读全文

posted @ 2020-02-04 01:09 卖肾割阑尾 阅读(284) 评论(0) 推荐(0)

常规容器下SpringBootServletInitializer如何实现web.xml作用解析
摘要:在之前的《使用jsp作为视图模板&常规部署》章节有过一个实践,需要启动类继承自SpringBootServletInitializer方可正常部署至常规tomcat下,其主要能够起到web.xml的作用。下面通过源码简单解析为何其能够替代web.xml。 本章概要1、源码分析如何实现SpringBo 阅读全文

posted @ 2020-02-04 01:04 卖肾割阑尾 阅读(225) 评论(0) 推荐(0)

springmvc框架(Spring SpringMVC, Hibernate整合)
摘要:直接干货 model 考虑给用户展示什么。关注支撑业务的信息构成。构建成模型。 control 调用业务逻辑产生合适的数据以及传递数据给视图用于呈献; view怎样对数据进行布局,以一种优美的方式展示给用户; MVC核心思想:业务数据抽取和业务数据呈献相分离。 看看Spring MVC官网给的图:h 阅读全文

posted @ 2018-08-05 16:37 卖肾割阑尾 阅读(184) 评论(0) 推荐(0)

事务种类jdbc,Hibernate,JTA事务
摘要:JDBC事务 String URL="jdbc:sqlserver://localhost:1433;databaseName=test2"; String USER="sa"; String PASSWORD="sapassword"; try { Class.forName("com.micro 阅读全文

posted @ 2018-07-29 15:20 卖肾割阑尾 阅读(132) 评论(0) 推荐(0)

web整合Spring和Hibernate
摘要:上一篇是简单整合web和Spring, 这一篇是整合hibernate: 连接池c3p0: spring5.0, hibernate5.0 jars: web.xml,增加高亮部分,不然会报 Could not obtain transaction-synchronized Session for 阅读全文

posted @ 2018-07-29 15:00 卖肾割阑尾 阅读(96) 评论(0) 推荐(0)

web整合Spring
摘要:Spring整合Web开发 时间:2017-2-2 02:17 ——导入jar包1、导入Spring开发基本jar包 spring-beans-3.2.0.RELEASE.jar spring-context-3.2.0.RELEASE.jar spring-core-3.2.0.RELEASE.j 阅读全文

posted @ 2018-07-28 15:09 卖肾割阑尾 阅读(109) 评论(0) 推荐(0)

导航