最近经常在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\depaik\depaikshop-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\depaik\.\C:\Users\niannian\AppData\Local\Temp\tomcat-docbase.2219837587488879077.8099\WEB-INF\captcha
F:\C:\Users\niannian\AppData\Local\Temp\tomcat-docbase.2219837587488879077.8099\WEB-INF\captcha
F:\java\depaik\depaikshop-admin\target\classes\C:\Users\niannian\AppData\Local\Temp\tomcat-docbase.2219837587488879077.8099\WEB-INF\captcha
F:\java\depaik\depaikshop-common\target\classes\C:\Users\niannian\AppData\Local\Temp\tomcat-docbase.2219837587488879077.8099\WEB-INF\captcha
' is not a directory or cannot be read
 

 

 

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

 

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

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

 

解决办法:

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

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

 

 

问题完美解决!NICE

相关文章:

  • 2021-04-04
  • 2022-12-23
  • 2021-10-19
  • 2021-05-16
  • 2021-08-31
  • 2021-11-23
  • 2021-09-02
猜你喜欢
  • 2021-11-18
  • 2022-02-07
  • 2021-07-16
  • 2021-12-10
  • 2022-12-23
  • 2021-06-27
  • 2021-11-21
相关资源
相似解决方案