Spring-Cloud编译出错汇总
来源:互联网 发布:四分位数java 编辑:程序博客网 时间:2024/05/21 08:41
问题1:
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException:
No unique bean of type [com.mkyong.common.Person] is defined:expected single matching bean but found 2: [personA, personB]
解决办法: @Qualifier()配合@Service()使用。
如:
在service实现类中:
@Service("ons")
public class VideointercomappService implements IVideointercomappService{}
在controller中引用:
@Autowired
@Qualifier("ons")
IVideointercomClients iVideointercomClients;
问题2:
The field file exceeds its maximum permitted size of 1048576 bytes.] with root cause
解决:
SpringBoot做文件上传时出现了The field file exceeds its maximum permitted size of 1048576 bytes.错误,显示文件的大小超出了允许的范围,原来Spring Boot工程嵌入的tomcat限制了请求的文件大小,这一点在Spring Boot的官方文档中有说明。
在application.yml
spring:
http:
multipart:
max-file-size: 20Mb
max-request-size: 20Mb
- Spring-Cloud编译出错汇总
- spring cloud相关知识汇总
- spring-cloud-netflix编译错误
- Spring JDBC 编译出错
- xcode编译出错问题汇总
- Android 源码编译出错汇总
- VS编译出错问题汇总
- Spring干货汇总(含Spring Boot与Spring Cloud)
- Spring干货汇总(含Spring Boot与Spring Cloud)
- Spring使用@Aspect注解编译出错
- Spring Cloud
- Spring Cloud
- Spring Cloud
- Spring Cloud
- Spring cloud
- spring Cloud
- Spring cloud
- spring cloud
- 设计模式之禅PK之行为类3
- bzoj1491: [NOI2007]社交网络
- 逗号排序
- Maven
- javascript基础篇
- Spring-Cloud编译出错汇总
- SPFA算法
- windows下安装tensorflow
- parcel打包工具
- go语言sync.WaitGroup
- 【限时免费】运维·安全·新纪元(大话运维 · 上海站)
- 到底该如何理解 Unix/Linux 的文件系统?看这篇就知道了
- Linux.ProxyM僵尸网络再次发起疯狂攻击,感染过万台设备
- Android Studio优化编译速度