按照视频的操作,本节内容出现如下问题
来源:3-6 _广告模块开发Service层图片上传功能(下)

慕妹4524825
2017-11-27
一.运行tomcat报错,
27-Nov-2017 17:44:16.122 警告 [http-nio-8081-exec-6] org.springframework.web.context.support.XmlWebApplicationContext.refresh Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.lang.String org.imooc.service.impl.AdServiceImpl.adImageSavePath; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'adImage.savePath' in string value "${adImage.savePath}"
27-Nov-2017 17:44:16.122 严重 [http-nio-8081-exec-6] org.springframework.web.servlet.DispatcherServlet.initServletBean Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.lang.String org.imooc.service.impl.AdServiceImpl.adImageSavePath; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'adImage.savePath' in string value "${adImage.savePath}"
二.打开后台首页加载不了js库文件,路径按照视频的配置的,好像是识别不了${basePath}??
2回答
-
1、你看下你的properties文件的加载和配置内容正确吗?
2、basePath在你截的图里不是已经成功解析成url了吗?你从哪看出basePath没有起作用的?012017-11-27 -
源生活
2017-11-27
和basePath没关系,它的任务已经完成了,已经解析成工程的访问根路径了,是你的js文件不能加载,看下部署在tomcat后是不是有问题,在你部署的tomcat下看看路径是否正确
00
IT段子手详解MyBatis遇到Spring 秒学Java SSM开发大众点评
1001 学习 · 485 问题
相似问题