码迷,mamicode.com
首页 >  
搜索关键字:spring 注解    ( 53409个结果
SpringBoot actuator(自定义端点类)
SpringBoot actuator(自定义端点类) 1、编写自动端点类很简单,只需要在类前面使用@Endpoint注解 EndPoint中id 来表示url路径 2、使用@ReadOperation //显示监控指标 3、使用@WriteOperation //动态修改指标,以post方式修改 ...
分类:编程语言   时间:2021-02-05 10:47:22    阅读次数:0
【Spring】动态代理模板
动态代理模板 /** * Description : * 公用这个类,自动生成代理类 * * @author : AirCL * Date : 2021/2/4 * Time : 20:27 */ public class ProxyInvocationHandler implements Invo ...
分类:编程语言   时间:2021-02-05 10:47:05    阅读次数:0
ControllerAdvice 注解的三种使用场景
@ControllerAdvice,顾名思义,这是一个增强的 Controller。使用这个 Controller ,可以实现三个方面的功能: 全局异常处理 全局数据绑定 全局数据预处理 全局异常处理 使用 @ControllerAdvice 实现全局异常处理,只需要定义类,添加该注解即可定义方式如 ...
分类:其他好文   时间:2021-02-05 10:33:02    阅读次数:0
springboot一些注解
RestController和Controller的区别 @RestController = @ResponseBody + @Controller 如果只是使用@RestController注解Controller,则Controller中的方法无法返回jsp页面,或者html,配置的视图解析器 ...
分类:编程语言   时间:2021-02-04 12:13:15    阅读次数:0
eclipse中lombok注解不生效
现象:eclipse中在对象上使用lombok的@Data,引用get方法时,没有set、get方法。 解决办法: 1.在lombok官网(https://www.projectlombok.org/download)下载lombok的jar包 2.把jar包放到eclipse同目录文件夹 3.双击 ...
分类:系统相关   时间:2021-02-04 12:01:51    阅读次数:0
Springboot+Spring-Security+JWT Sso单点登录
单点登录中目前比较流行的一种使用方式,就是springsecurity+jwt实现无状态下用户登录;下面是对于Spring-Security进行单点登录使用token来进行交互的一种方式。第一次写博客请多多指教如果有更好的方式或者是错误的点麻烦请指教。 Spring-Security的主要几个实现类 ...
分类:编程语言   时间:2021-02-04 11:52:26    阅读次数:0
重写定义Spring Boot FeignClient 捕获异常信息
FeignClient 默认的解析器: public static FeignException errorStatus(String methodKey, Response response) { // 这里做了处理 String message = format("status %s readi ...
分类:编程语言   时间:2021-02-03 11:08:33    阅读次数:0
基于 spring boot 下logback 的 logback-spring.xml 配置文件
true UTF-8 %d{yyyy-MM-dd HH:mm:ss.SSS} %highlight(%-5level) %magenta([PID:${PID:-}]) %green([%15.15thread]) %cyan(%40.40logger:%-5.5L):%msg%n ${PATH}/ ...
分类:编程语言   时间:2021-02-03 11:07:10    阅读次数:0
Spring 事务、异步和循环依赖有什么关系?
前言 在循环依赖中有一种循环依赖,就是自注入:自己依赖自己。 事务的自注入 在 Spring 自调用事务失效,你是怎么解决的? 有小伙伴提出可以自己注入自己来解决事务失效。 具体使用方式如下: @Slf4j @Service public class OrderBizServiceImpl impl ...
分类:编程语言   时间:2021-02-03 10:46:35    阅读次数:0
@FeignClient注解
Spring Cloud 是目前最火的微服务框架,Feign 作为基础组件之一,在 Spring Cloud 体系中发挥了重要的作用。 一、FeignClient注解 FeignClient注解被@Target(ElementType.TYPE)修饰,表示FeignClient注解的作用目标在接口上 ...
分类:其他好文   时间:2021-02-03 10:31:00    阅读次数:0
53409条   上一页 1 ... 64 65 66 67 68 ... 5341 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!