posted @ 2022-02-23 16:42
02 2022 档案
摘要:springCloud升级后。导致 HtystrixDashboard 默认的servlet请求路径修改了 将业务的微服务使用 HtystrixDashboard 仪表盘第一次监控时出现 Unable to connect to Command Metric Stream. 解决办法: 这都是 业务
阅读全文
摘要:创建数据库连接池配置类 package com.boot.config; import com.alibaba.druid.pool.DruidDataSource; import com.alibaba.druid.support.http.StatViewServlet; import org.
阅读全文
posted @ 2022-02-19 17:54
摘要:在自定义的config配置类中,重写configureContentNegotiation方法 @Bean public WebMvcConfigurer webMvcConfigurer(){ return new WebMvcConfigurer() { /** * 自定义内容协商策略 * @p
阅读全文
posted @ 2022-02-17 21:55
摘要:创建一个MessageConvert类,实现HttpMessageConvert接口 简单实现,只完成写功能。其他默认false package com.boot.converter; import com.boot.pojo.Person; import org.springframework.h
阅读全文
posted @ 2022-02-17 21:08
摘要:创建一个配置类。使用 @bean注入到容器中 @Bean public WebMvcConfigurer webMvcConfigurer(){ /** * 实现自定义的addConverter */ @Override public void addFormatters(FormatterRegi
阅读全文
posted @ 2022-02-17 18:21
摘要:一、矩阵变量请求格式 /users;id=1,uname=jack 二、SpringBoot开启矩阵请求 首先查看springboot源码关于矩阵部分的内容 在 WebMvcAutoConfiguration配置类中。 @Override public void configurePathMatch
阅读全文
posted @ 2022-02-17 14:11