![](https://img-blog.csdnimg.cn/20190927151053287.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Spring
文章平均质量分 59
About Spring
今夕何夕zZ
这个作者很懒,什么都没留下…
展开
-
Spring 应用上下文生命周期
Spring 应用上下文启动准备阶段org.springframework.context.support.AbstractApplicationContext#prepareRefresh()启动时间 - startupDate状态标识 - closed(false)、active(true)初始化 PropertySources - initPropertySources()检验 Environment 中必须属性初始化事件监听器集合初始化早期 Spring 事件集合BeanF原创 2021-03-27 21:54:29 · 94 阅读 · 0 评论 -
Spring autowired 属性注入候选 Bean 数量大于一个时选择注入 Bean 的优先级
Spring autowired 属性注入候选 Bean 数量大于一个时注入 Bean 的优先级结论标记有 @Qualifier 的 autowired 属性会在 DefaultListableBeanFactory#doResolveDependency -> resolveMultipleBeans(descriptor, beanName, autowiredBeanNames, typeConverter) -> … -> QualifierAnnotationAutowir原创 2021-03-22 21:50:12 · 346 阅读 · 0 评论 -
简单记录 Spring Bean 生命周期
注册 BeanDefinitionDefaultListableBeanFactory#registerBeanDefinition()合并 BeanDefinitionAbstractBeanFactory#getMergedBeanDefinition():GenericBeanDefinition -> RootBeanDefinition、合并 PropertyVlauesSpring Bean 实例化前阶段AbstractAutowireCapableBeanFactory#res原创 2020-11-16 00:06:44 · 165 阅读 · 0 评论 -
Bean Validation - 自定义注解实现枚举类型校验
Spring MVC 枚举入参校验枚举入参校验注解@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})@Retention(RUNTIME)@Documented@Constraint(validatedBy = {EnumValidator.class})public @interface EnumValid { String message() default "枚举值不在范围内";原创 2020-08-30 20:06:08 · 558 阅读 · 0 评论 -
Spring Web MVC REST 处理流程
Spring MVC REST 处理流程一、什么是Spring Web MVC官网介绍:Spring Web MVC is the original web framework built on the Servlet API and has been included in the Spring Framework from the very beginning. The formal n...原创 2020-01-05 22:38:01 · 348 阅读 · 0 评论 -
使用 MyBatis-Plus 实现 PO 对象枚举类型与 JdbcType 互相转换
1. 相关版本说明Spring Boot 版本:2.2.2.RELEASEMyBatis-Plus 版本:3.3.02. 模型准备2.1 User BO@Data@TableName("t_user")public class User { /** * ID */ @TableId(value = "id", type = IdType...原创 2019-12-21 16:20:25 · 3880 阅读 · 1 评论 -
SpringMVC 无法访问到指定jsp页面可能的原因
在SpringMVC的controller中对url进行分类的时候,在controller类前面配置@RequestMapping()无法正确访问到jsp页面,可以看见是路径错误,即多层路径的@RequestMapping无法找到指定jsp文件,很明显是路径配置问题,查看springmvc配置文件后发现配置视图解析器前缀是使用相对路径,所以去的也是相对路径即ContextPath/stud...原创 2017-01-19 20:31:49 · 6059 阅读 · 2 评论