springMVC的问题
1.出现的异常实现类动态代理的出错了
***************************
APPLICATION FAILED TO START
***************************
Description:
The bean 'attachCacheService' could not be injected as a 'com.abc.service.AttachCacheService' because it is a JDK dynamic proxy that implements:
Action:
Consider injecting the bean as one of its interfaces or forcing the use of CGLib-based proxies by setting proxyTargetClass=true on @EnableAsync and/or @EnableCaching.
Process finished with ex 类it code 1
解决这个问题的思路首先想到的是注解是否没加入。
如果注解已经添加了是否写法上没有按照传统定义的方式,没有定义接口及实现,而是直接定义了实现类
解决方案:
如果出现的原因是没有按照传统方式进行定义,解决的方式有:
①在启动类上加上@EnableTransactionManagement(proxyTargetClass = true)
②在配置类配置spring.aop.proxy-target-class=true
③按照传统方式定义接口及其实现类
2.413的问题
一般就是文件过大,请求体过大,nginx不支持,去设置nginx的上传大小
3.403问题,路径写错了,跨域问题,方法代码没有生效
4.spring的循环依赖问题
问题报错:‘allowEagerInit’ flag turned off
解决思路:@Lazy注解加载@Autowired上,双方都需要加
这一块具体的解决思路还是不太清楚,后续在进行研究吧
@Autowired
@Lazy
private FlawService flawService;