Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateExceptio
·
springboot @Resource 不支持静态变量
实际代码
@Service
public class PhotoProcessImpl implements PhotoProcessService {
@Resource
private PhotoUtil photoUtil;
@Resource
private ReadGlobalConfig readGlobalConfig;
/** 图片上传地址*/
private static final String FILE_PATH="upLoad-photo";
/** 默认生成的图片大小150K */
@Resource
private static final Integer DEFAULT_TO_SIZE=150*1024;
@Override
public String upLoadPhoto(MultipartFile file,String ip) {
}
}
解决:将静态变量上的@Resource 去掉
@Resource
private ReadGlobalConfig readGlobalConfig;
/** 图片上传地址*/
private static final String FILE_PATH="upLoad-photo";
/** 默认生成的图片大小150K */
private static final Integer DEFAULT_TO_SIZE=150*1024;
更多推荐
已为社区贡献3条内容
所有评论(0)