問(wèn)題描述
Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name ‘org.apache.shiro.spring.config.web.autoconfigure.ShiroWebFilterConfiguration’: Unsatisfied dependency expressed through field ‘filterMap’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘webMvcConfiguration’: Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder ‘jeecg.path.webapp’ in value “${jeecg.path.webapp}”
按照錯(cuò)誤 找到這個(gè)地方 也就是
@Value("${jeecg.path.webapp}")
現(xiàn)在補(bǔ)充一個(gè)知識(shí)點(diǎn) @Value 的幾種用法
出現(xiàn)這個(gè)錯(cuò)誤的原因就是@Value(“${jeecg.path.webapp}”)沒(méi)法找到里面的值 而這個(gè)值是去配置文件里面找的.所以出現(xiàn)這個(gè)問(wèn)題的根本原因就是
- 配置文件指定錯(cuò)誤
- 沒(méi)指定配置文件
解決辦法
指定配置文件
有時(shí)候github上下載的項(xiàng)目有多個(gè)yml文件 在application.yml中的active中指定你需要的配置文件
指定為Resource文件
如果resources 文件夾沒(méi)有指定為Resources 也會(huì)出現(xiàn)這個(gè)問(wèn)題 把他指定為Resources文件即可文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-731772.html
文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-731772.html
到了這里,關(guān)于Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyExc的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!