
spring
guyue35
这个作者很懒,什么都没留下…
展开
-
Spring Boot启动过程 和 Bean初始化过程中的拓展接口详解
Spring Boot启动过程和 Bean初始化过程中的拓展接口详解1.背景 Spring的核心思想就是容器,当容器refresh的时候,外部看上去风平浪静,其实内部则是一片惊涛骇浪,汪洋一片。Springboot更是封装了Spring,遵循约定大于配置,加上自动装配的机制。很多时候我们只要引用了一个依赖,几乎是零配置就能完成一个功能的装配。 我非常喜欢这种自动装配的机制,所以在自己开发中间件和公共依赖工具的时候也会用到这个特性。让使用者...原创 2020-07-11 16:17:43 · 2874 阅读 · 0 评论 -
Spring组合注解详解(注解合并及别名属性覆盖)
Spring组合注解详解(注解合并及别名属性覆盖)组合注解 注解的作用就不用介绍了吧,主要就是用来简化配置,通过自定义注解或者其他框架提供的注解,只要往方法或者类上一加,就可以实现许多神奇的功能。 spring 4.2之后就提供了组合注解的实现方式,啥是组合注解呢,其实就是将多个注解作用于一个注解,用一个注解就可以来实现那多个注解的功能,使作用的元素(即方法或类等)看上去更简洁美观,当然主要还是更强大的属性覆盖功能。 举个最常见的组合注解吧,即spring的@Res...原创 2020-06-11 16:41:48 · 11583 阅读 · 0 评论 -
Spring Bean中构造函数,@PreDestroy,@Autowired,@PostConstrut,@PreDestroy,afterPropertiesSet,destroy执行顺序
Spring中构造器、init-method、@PostConstruct、afterPropertiesSet孰先孰后,自动注入发生时间以及单例多例的区别、SSH线程安全问题 - QiaoZhi - 博客园https://www.cnblogs.com/qlqwjy/p/9417034.htmlSpring中构造器、init-method、@PostConstruct、a...原创 2020-03-12 14:09:43 · 1141 阅读 · 0 评论 -
spring中的两种拦截器HandlerInterceptor和MethodInterceptor详解
spring中的拦截器(HandlerInterceptor+MethodInterceptor) - niceyoo - 博客园https://www.cnblogs.com/niceyoo/p/8735637.htmlspring中的拦截器(HandlerInterceptor+MethodInterceptor)1. 过滤器跟拦截器的区别在...原创 2020-03-04 17:34:02 · 11319 阅读 · 3 评论 -
Spring Boot微服务间文件返回实现
Feign接口获取文件流问题_Java_wyazyf的博客-优快云博客https://blog.youkuaiyun.com/wyazyf/article/details/93200033SpringBoot微服务间文件返回实现下层服务返回文件流(即文件下载)@GetMapping(value = "/v1/files/**/{file_name:.+}")...原创 2020-02-24 18:03:47 · 2401 阅读 · 0 评论 -
Spring filter, interceptor, controllerAdvice, aspect, controller调用顺序
如图:请求进来 会按照filter ->interceptor -> controllerAdvice -> aspect-> controller的顺序调用当controller返回异常 也会按照controller ->aspect ->controllerAdvice ->interceptor ->...原创 2019-08-04 21:30:36 · 1247 阅读 · 0 评论 -
Intellij IDEA 安装, 配置, 激活jrebel进行项目的热部署 (包括ide自带的热更新)
Intellij IDEA 安装和配置jrebel进行项目的热部署 (比较彻底, 对url修改生效, 函数逻辑修改生效)https://www.cnblogs.com/a8457013/p/7866625.htmlJrebel 激活服务https://blog.youkuaiyun.com/cjwcjwwjcwjc/article/details/80050633idea自带的热加载 (不彻...转载 2019-03-18 17:00:48 · 854 阅读 · 0 评论 -
改变eureka server中注册的服务的健康检测方式(接入spring-boot-actuator模块)
改变eureka server中注册的服务的健康检测方式 - xiao_jun_0820的专栏 - 优快云博客https://blog.youkuaiyun.com/xiao_jun_0820/article/details/77991963 验证spring-boot-actuator模块的/health端点是否检测mysql, redis的连接情况1. 正常启动...原创 2019-01-23 11:03:38 · 528 阅读 · 0 评论 -
SpringBoot使用Redis缓存 + @Cacheable, @CachePut, @CacheEvict注解使用
目录SpringBoot使用Redis缓存Spring缓存注解@Cache使用@Cacheable、@CachePut、@CacheEvict 注释介绍 SpringBoot使用Redis缓存 - gdpuzxs - 博客园https://www.cnblogs.com/gdpuzxs/p/7222309.html SpringBoot使用Redis...原创 2018-12-13 17:59:30 · 2972 阅读 · 0 评论 -
SpringBoot几种定时任务的实现方式
SpringBoot几种定时任务的实现方式 | wanqh的个人博客http://www.wanqhblog.top/2018/02/01/SpringBootTaskSchedule/ SpringBoot几种定时任务的实现方式 定时任务实现的几种方式:Timer:这是java自带的java.util.Timer类,这个类允许你调度一个java.util.Tim...转载 2018-12-07 18:04:27 · 465 阅读 · 0 评论 -
Spring Boot中使用@Async实现异步调用
Spring Boot中使用@Async实现异步调用 | 程序猿DDhttp://blog.didispace.com/springbootasync/ Spring Boot中使用@Async实现异步调用 博主推荐 : 掘金是一个面向程序员的的技术社区,从 后端到架构,从Spring教程到开源库,无论是入门还是进阶,来掘金你不会错过后端开发的任何一个技术干货。什...转载 2018-12-04 18:59:31 · 582 阅读 · 0 评论 -
SpringBoot自定义注解Annotation及带参数的使用
一. 首先导入相关包, 在build.gradle中添加dependencies { //支持AOP compile('org.springframework.boot:spring-boot-starter-aop')}二. 添加一个自定义的注解类TestAnnotation:import java.lang.annotation.*;...原创 2018-11-23 14:42:11 · 21576 阅读 · 6 评论 -
Spring中@Configuration注解使用
在Spring中使用@Configuration注解加载JavaConfig配置-zifangsky的博客备份-51CTO博客 http://blog.51cto.com/983836259/1889610 如题所示,从一些翻译至国外的书籍中可以看到,一些西方人喜欢使用没有XML文件的纯粹的JavaConfig配置。但是一方面在国内我们通常都习惯使用XML文件来配置Spri...原创 2018-11-23 16:19:40 · 289 阅读 · 0 评论 -
spring data jpa 与 jpa的区别
spring data jpa 与 jpa的区别 - sinat_39789638的博客 - 优快云博客https://blog.youkuaiyun.com/sinat_39789638/article/details/78045990 spring data jpa是spring公司下的spring data项目的一个模块。 spring data jpa定义了接口来进行持久层的编写规范,同...转载 2018-11-21 18:35:40 · 5977 阅读 · 0 评论 -
spring中Constructor、@Autowired、@PostConstruct的顺序
spring中Constructor、@Autowired、@PostConstruct的顺序 - u014515854的博客 - 优快云博客https://blog.youkuaiyun.com/u014515854/article/details/78832790 其实从依赖注入的字面意思就可以知道,要将对象p注入到对象a,那么首先就必须得生成对象p与对象a,才能执行注入。所以,如...转载 2018-10-26 16:55:00 · 820 阅读 · 0 评论 -
@Autowired @Resource @Qualifier的区别
@Autowired @Resource @Qualifier的区别 - 小虾米的java梦 - 博客园https://www.cnblogs.com/fengli9998/p/7472247.html @Autowired @Resource @Qualifier的区别参考博文:http://www.cnblogs.com/happyyang/articles/35...原创 2018-10-26 15:32:42 · 546 阅读 · 0 评论 -
Spring Boot中实现logback多环境日志配置(日志输出)
Spring Boot中实现logback多环境日志配置 - EasonJim - 博客园https://www.cnblogs.com/EasonJim/p/7801549.html Spring Boot中实现logback多环境日志配置方法一:在Spring Boot中,可以在logback.xml中的springProfile标签中定义多个环境logback.xm...原创 2018-10-15 16:37:43 · 10093 阅读 · 3 评论 -
Springboot统一配置Jackson(全局命名转换)
Springboot统一配置Jackson - Ryan.Miao - 博客园https://www.cnblogs.com/woshimrf/p/springboot-jackson-global-config.html Jackson命名转换 - liuguidongliuguidong的专栏 - 优快云博客https://blog.youkuaiyun.com/liuguido...原创 2018-10-15 15:45:52 · 12493 阅读 · 0 评论 -
Spring AOP切面优先级(XML和注解)
【Spring4.0笔记整理十四】AOP切面优先级(XML和注解) - 优快云博客https://blog.youkuaiyun.com/sun8112133/article/details/80551886 我们常常会遇到这样一个问题, 如果有两个或多个切面同时对应同一个目标对象时,那么它的优先级是怎样的呢? 本篇就对切面优先级进行 XML 和 注解 的设置。 本篇可以分为两部分:...原创 2018-09-27 10:56:07 · 1253 阅读 · 0 评论