Springboot
huang_yx
希望能加入一个值得信赖的团队。
展开
-
springboot自定义注解实现参数验证
效果演示: 1.创建自定义注解类 @Target(ElementType.PARAMETER)// 表示该注解是加载参数上的; @Target: 定义放在什么位置,这个是放在参数中 @Retention(RetentionPolicy.RUNTIME)// 注解保留到运行阶段; @Retention: 定义了该Annotation被保留的时间长短,有些只在源码中保留,有时需要编译成的class中保留,有些需要程序运行时候保留。即描述注解的生命周期 public @interface Param原创 2020-08-17 16:18:10 · 1735 阅读 · 0 评论 -
Springboot基础与java配置注入的比较以、自动配置原理及SpringBoot启动类中Main方法源码解析
1.了解SpringBoot 1.1.什么是SpringBoot SpringBoot是Spring项目中的一个子工程,与我们所熟知的Spring-framework同属于Spring的产品。 官方介绍: Takes an opinionated view of building production-ready Spring applications. Spring Boot favors convention over configuration and is designed to get y原创 2020-07-30 23:49:39 · 2128 阅读 · 0 评论