- 微服务来了,监控怎么办?
- Spring Boot 2.x监控数据可视化(Actuator + Prometheus + Grafana手把手)
- Grafana+Prometheus打造springboot监控平台
- SpringBoot 2.x Prometheus Grafana实现应用可视化监控
- Prometheus+ Grafana 微服务系统监控方案搭建
- 四款云服务监控工具介绍:Nagios 、 ganglia、zabbix、onealert
- 微服务治理框架的技术选型
- Consul+Prometheus系统监控之服务发现
- 从零开始搭建ELK+GPE监控预警系统
- Prometheus 通过consul动态修改Targets接入
- 微服务监控Spring Boot Admin
- Hystrix-Dashboard仪表盘
- SpringCloud2.0微服务搭建集成Turbine遇到的一些坑以及解决办法
- Prometheus官方文档
- Consul+Prometheus系统监控之注册发现
- 从零开始搭建ELK+GPE监控预警系统
- Prometheus的监控解决方案(含监控kubernetes)
- prometheus的监控解决方案
- Kubernetes平台监控方案之:Exporters+Prometheus+Grafana
- grafana官方
- Grafana使用mysql作为数据源,呈现图表
1.项目使用的是Spring Boot + Spring Cloud,上传附件报超出自带tomacat限制大小(默认1M)
"Maximum upload size exceeded; nested exception is java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$FileSizeLimitExceededException:
The field file exceeds its maximum permitted size of 1048576 bytes
2.解决方案
(1)在配置文件(application.properties)加入如下代码
spring:
servlet:
multipart:
max-file-size: 10MB
max-request-size: 100MB
maxFileSize 单个数据大小
maxRequestSize 是总数据大小
(2)把如下代码放在启动类上,并在类上加入@Configuration
/**
* 文件上传配置
*
* @return
*/
@Bean
public MultipartConfigElement multipartConfigElement() {
MultipartConfigFactory factory = new MultipartConfigFactory();
// 单个数据大小
factory.setMaxFileSize("10MB"); // KB,MB
/// 总上传数据大小
factory.setMaxRequestSize("100MB");
return factory.createMultipartConfig();
}
PS:若是有网关之类的中转,需在网关中也加入如上配置。