我出现此错误的原因是web.xml中没有指定spring的启动配置文件applicationContext.xml的加载位置。applicationContext.xml原来再webRoot/webInfo下,后来我把applicationContext.xml放在了src根目录下了。

因此需要再web.xml指定一下。

<context-param>

  <context-name>contextConfigLocation</context-name>

  <context-value>classpath:applicationContext.xml</context-value>

</context-param>

Configuration problem: 'bean' or 'parent' is required for <ref> element的更多相关文章

  1. org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unexpected failure during bean definition parsing Offending resource: class path resource [applicationC

    这个错误是 org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration proble ...

  2. Configuration problem: Failed to import bean definitions from relative location

    问题现象: 最近开始做新需求,然后在Tomcat上部署项目时,出现了如下报错: [12-05 09:54:27,161 ERROR] ContextLoader.java:351 - Context ...

  3. org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Can

    org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Can ...

  4. Maven Java EE Configuration Problem 的完美解决办法

    背景: 最近在修改项目的时候,发现修改了项目依赖以后会出现如下图:Maven Java EE Configuration Problem 的问题,对于有强迫症的我来说,看到项目上面有个很小的红色小叉号 ...

  5. @Configuration 和 @Bean

    1. @Bean: 1.1 定义 从定义可以看出,@Bean只能用于注解方法和注解的定义. @Target({ElementType.METHOD, ElementType.ANNOTATION_TY ...

  6. BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler错误的解决方法

    出现这个问题是因为我的spring3.0里的包是单独引用的,缺少了别的包 譬如Configuration problem: Unable to locate Spring NamespaceHandl ...

  7. sharepoint 2013 "The module ... owssvr.dll could not be loaded due to a configuration problem"

    打开sharepoint站点可以看到这个503的错误, 在event viewer中查看如下: The Module DLL 'C:\Program Files\Common Files\Micros ...

  8. Springboot@Configuration和@Bean详解

    Springboot@Configuration和@Bean详解 一.@Configuration @Target({ElementType.TYPE}) @Retention(RetentionPo ...

  9. Spring的Java配置方式—@Configuration和@Bean实现Java配置

    Java配置是Spring4.x推荐的配置方式,可以完全替代xml配置. 1.@Configuration 和 @BeanSpring的Java配置方式是通过 @Configuration 和 @Be ...

随机推荐

  1. 云原生 PostgreSQL 集群 - PGO:来自 Crunchy Data 的 Postgres Operator

    使用 PGO 在 Kubernetes 上运行 Cloud Native PostgreSQL:来自 Crunchy Data 的 Postgres Operator! Cloud Native Po ...

  2. Python中random模块的用法案例

    1 import random # 调用random模块 2 3 a = random.random() # 随机从0-1之间抽取一个小数 4 print(a) 5 6 a = random.rand ...

  3. Python中模块import的使用案例

    1 import test # 导入test模块 2 3 print(test.a) # 使用"模块.变量"调用模块中的变量 4 5 test.hi() # 使用"模块. ...

  4. [theHunterCOTW] 猎人荒野的召唤-一点资料

    游戏介绍 购买建议 [2020-12-17] theHunter 现在有三个捆绑包 2019 Edition,2021 Edition,Complete Collection 单独购买,目前steam ...

  5. 医疗BI系统的数据分析是怎样的?

    在社会日益发展和信息化的过程中,已经发展处行业化.智能化的各类IT系统及子系统,如ERP.CRM.财务等等.实现经营流程数字化的同时,各行业企业的数据库日益庞大,医疗行业也不例外.我国医疗行业经过多年 ...

  6. java集合框架中contains(),containsKey()和containsValue()的用法:

    List集合的contains()方法用于判断集合中包不包含某个元素,返回值是boolean. Map集合的containsKey()和containsValue()方法和上面的相同. 示例: pub ...

  7. oracle plsql手动修改数据

    转至:https://blog.csdn.net/Ranchonono/article/details/87690830?spm=1001.2101.3001.6650.1&utm_mediu ...

  8. 使用Filter过滤器,解决中文乱码问题

    首先是建立一个filter.java文件,注意implements的是Filter的servlet的那个包: public class filter11 implements Filter { @Ov ...

  9. Java 中线程池的 7 种创建方式!

    在 Java 语言中,并发编程都是通过创建线程池来实现的,而线程池的创建方式也有很多种,每种线程池的创建方式都对应了不同的使用场景,总体来说线程池的创建可以分为以下两类: 通过 ThreadPoolE ...

  10. LeetCode-096-不同的二叉搜索树

    不同的二叉搜索树 题目描述:给你一个整数 n ,求恰由 n 个节点组成且节点值从 1 到 n 互不相同的 二叉搜索树 有多少种?返回满足题意的二叉搜索树的种数. 二叉搜索树(Binary Search ...