[ERROR] Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.itheima.config.SpringConfig]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/jdbc.properties]
    at org.springframework.context.annotation.ConfigurationClassParser.parse 

在做spring+springMvc+mybatis项目时报Context initialization failed错误,先检查spring配置类扫描properties配置文件的注解是否加了classpath,@PropertySource(“classpath:jdbc.properties”)

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐