在Eclipse中新建了一个maven项目学习Spring,在 service.xml 中配置 Spring,想要学习‘面向切面的Spring’,service.xml 内容如下:

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/shema/aop"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:c="http://www.springframework.org/schema/c"
xsi:schemaLocation="
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
">
<bean id="audience" class="proxy.Audience" />
<aop:config>
<aop:aspect ref="audience">
<aop:around
pointcut="execution(** concert.Performance.perform(..))"
method="watchPerformance(ProceedingJoinPoint)" />
</aop:aspect>
</aop:config>
</beans>

结果写 <aop: ** > 的时候,没有代码提示,而且总是出现错误提示:

Multiple annotations found at this line:

- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element

'aop:config'.

如图所示:

网上搜索解决方案,看到类似的问题是 xsi:schemaLocation 中的 url 没有配置好。思来想去,可能是因为自己在 <beans > 中的url没有写正确,就Ctrl+F 搜索‘http://www.springframework.org/schema/’,匹配的字符串就会背景高亮显示。发现果然是因为 “xmlns:aop="http://www.springframework.org/shema/aop" 没有写正确 --- shema 应该是 schema

改正以后就好了。ヾ(@@)ノ

《Spring实战》-- 'cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element' 错误的解决办法的更多相关文章

  1. Spring 错误 cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:property-placeholder'.

    我来说下这个出错的原因吧 eclise中xsd的验证问题Description Resource Path Location Type cvc-complex-type.2.4.c: The matc ...

  2. Spring Boot 调用 MongoRepository时报org.springframework.beans.factory.NoSuchBeanDefinitionException错误的解决办法

    这个问题整整折腾了我两天,现在记录下来,希望可以帮助和我一样,遇到相同问题的小伙伴. 项目是分层的(Intellij IDEA中的模块Module),有API(Core)层,Service&D ...

  3. Spring Boot连接MySQL长时间不连接后报错`com.mysql.cj.core.exceptions.ConnectionIsClosedException: No operations allowed after connection closed.`的解决办法

    报错:com.mysql.cj.core.exceptions.ConnectionIsClosedException: No operations allowed after connection ...

  4. Spring MVC Rest服务 返回json报406错误的解决办法

    @ResponseBody & @RequestBody @RequestBody 将 HTTP 请求正文插入方法中,使用适合的HttpMessageConverter将请求体写入某个对象. ...

  5. Type cvc-complex-type.2.4.c: The matching wildcard is strict...

    这个问题困扰了我两次,分别说一下原因:1. 如网上一些网友所言,是在配置Spring的标签库的时候有拼写错误或者遗漏.下面贴一个标准3.0的吧: <?xml version="1.0& ...

  6. 【Spring】The matching wildcard is strict……

    applicationContext.xml 文件抛出了这个异常信息. 解决方法: 需要在 namespace 后加上对应的 schemaLocation,如下所示: <?xml version ...

  7. Spring如何加载XSD文件(org.xml.sax.SAXParseException: Failed to read schema document错误的解决方法)

    今天配置Spring的xml出现了错误 Multiple annotations found at this line: - schema_reference.4: Failed to read sc ...

  8. Spring实战拆书--SpringBean

    代码源码地址:https://github.com/wujiachengSH/springBeanDemo 概述:本章将讲解Spring对于Bean的管理方案. 目录: 准备工作 自动装配 处理装配歧 ...

  9. No Spring WebApplicationInitializer types detected on classpath 问题的一种解决办法

    今天在idea中编译部署工程,tomcat报了这个错误: No Spring WebApplicationInitializer types detected on classpath 导致前端页面访 ...

随机推荐

  1. 【sping揭秘】7、国际化信息支持

    Spring提供messagesource接口,来进行国际化事务处理 Applicationcontext会优先找一个名为messageSouce的messageSource接口实现bean,如果找不 ...

  2. JS数组去重的几种常见方法

    JS数组去重的几种常见方法 一.简单的去重方法 // 最简单数组去重法 /* * 新建一新数组,遍历传入数组,值不在新数组就push进该新数组中 * IE8以下不支持数组的indexOf方法 * */ ...

  3. Xamarin 绑定安卓第三方库恢复原始参数问题

    大家都知道在绑定xamarin android 第三方库的时候 参数名是乱码的 变成了p1  p2  p3 之类的 这样在实际使用的时候非常不方便. 其实xamarin是提供了三种方式帮助大家恢复ja ...

  4. dbvisulizer 存储过程

    --/ CREATE PROCEDURE test () BEGIN DECLARE v CHAR(10) DEFAULT 'Hello';SELECT CONCAT(v, ', ', current ...

  5. 课程一(Neural Networks and Deep Learning),第四周(Deep Neural Networks)—— 1.Practice Questions: Key concepts on Deep Neural Networks

    [解释] [解释] 比如算法中的learing rateα(学习率).iterations(梯度下降法循环的数量).L(隐藏层数目).n[l] (隐藏层单元数目).choice of activati ...

  6. python使用(四)

    1.file_os_option.py2.file_option.py3.configfile_option.py4.logger_option.py 1.file_os_option.py # co ...

  7. Maven启用代理服务器访问

    0.什么叫代理服务器? 代理服务器英文全称是(Proxy Server),其功能就是代理网络用户去取得网络信息.形象的说:它是网络信息的中转站. 代理服务器就好象一个大的Cache,这样就能显著提高浏 ...

  8. 【java初探外篇01】——关于Java修饰符

    本文记录在学习Java语言过程中,对碰到的修饰符的一些疑问,在这里具体的拿出来详细学习和记录一下,以作后续参考和学习. Java修饰符 Java语言提供了很多修饰符,但主要分两类: 访问修饰符 非访问 ...

  9. EventProcessor与WorkPool用法--可处理多消费者

    单一的生产者,消费者有多个,使用WorkerPool来管理多个消费者: RingBuffer在生产Sequencer中记录一个cursor,追踪生产者生产到的最新位置,通过WorkSequence和s ...

  10. java concurrent 探秘

    我们都知道,在JDK1.5之前,Java中要进行业务并发时,通常需要有程序员独立完成代码实现,当然也有一些开源的框架提供了这些功能,但是这些依然没有JDK自带的功能使用起来方便.而当针对高质量Java ...