项目在eclipse中可以运行,在idea中出现java.io.FileNotFoundException

最近经常在Eclipse上跑的项目打算尝试使用Idea 工具,但是启动的时候遇到棘手的一个问题:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adminCommonController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'captchaServiceImpl': Unsatisfied dependency expressed through field 'imageCaptchaService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'imageCaptchaService' defined in class path resource [net/shop/boot/WebConfig.class]: Unsatisfied dependency expressed through method 'imageCaptchaService' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'captchaEngine' defined in file [F:\java\common\target\classes\net\shop\CaptchaEngine.class]: Invocation of init method failed; nested exception is com.octo.captcha.CaptchaException: All tried paths :'C:\Users\niannian\AppData\Local\Temp\tomcat-docbase.2219837587488879077.8099\WEB-INF\captcha
F:\java\.\C:\Users\AppData\Local\Temp\tomcat-docbase.2219837587488879077.8099\WEB-INF\captcha
F:\C:\Users\AppData\Local\Temp\tomcat-docbase.2219837587488879077.8099\WEB-INF\captcha
F:\java\admin\target\classes\C:\Users\niannian\AppData\Local\Temp\tomcat-docbase.2219837587488879077.8099\WEB-INF\captcha
F:\java\common\target\classes\C:\Users\niannian\AppData\Local\Temp\tomcat-docbase.2219837587488879077.8099\WEB-INF\captcha
' is not a directory or cannot be read
 

 

<!- 截图涉及一些项目名称 此处删去-->

 

查了很多帖子和经验,最后发现是配置问题,不是原生使用Idea生成的springboot 项目 可能存在这个问题

,项目启动的时候静态资源访问地址问题!

 

解决办法:

Idea : Run -- > Edit Config.... --> 选中你要修改的model项目或者项目,如下图:

 

 

问题完美解决!NICE!

 

  • 4
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值