问题描述
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}”
现在补充一个知识点 @Value 的几种用法
出现这个错误的原因就是@Value(“${jeecg.path.webapp}”)没法找到里面的值 而这个值是去配置文件里面找的.所以出现这个问题的根本原因就是
解决办法
指定配置文件
有时候github上下载的项目有多个yml文件 在application.yml中的active中指定你需要的配置文件
指定为Resource文件
如果resources 文件夹没有指定为Resources 也会出现这个问题 把他指定为Resources文件即可