博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
错误提示:The prefix "aop" for element "aop:config" is not bound.
阅读量:4051 次
发布时间:2019-05-25

本文共 1244 字,大约阅读时间需要 4 分钟。

 错误提示:The prefix "aop" for element "aop:config" is not bound.
The prefix "tx" for element "tx:advice" is not bound
Eclipse不能识别 aop 标签,提示:The prefix "aop" for element "aop:config" is not bound.
不识别<tx:advice/>标签,提示:The prefix "tx" for element "tx:advice" is not bound
原因:
我们在定义申明AOP的时候。没有加载schema。
解决:
首先应该加载JAR包。
还要在<beans>中要加入“xmlns:aop”的命名申明,并在“xsi:schemaLocation”中指定aop配置的schema的地址
配置文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans "
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
xmlns:aop="http://www.springframework.org/schema/aop "
xmlns:tx="http://www.springframework.org/schema/tx "
xsi:schemaLocation="http://www.springframework.org/schema/beans
                     http://www.springframework.org/schema/beans/spring-beans.xsd
                     http://www.springframework.org/schema/tx
                     http://www.springframework.org/schema/tx/spring-tx.xsd
                     http://www.springframework.org/schema/aop
                     http://www.springframework.org/schema/aop/spring-aop.xsd
">
这些才是最关键的地方。。后面的配置不变。。。。
我解释一下(* com.evan.crm.service.*.*(..))中几个通配符的含义:
第一个 * —— 通配 任意返回值类型
第二个 * —— 通配 包com.evan.crm.service下的任意class
第三个 * —— 通配 包com.evan.crm.service下的任意class的任意方法
第四个 .. —— 通配 方法可以有0个或多个参数
综上:包com.evan.crm.service下的任意class的具有任意返回值类型、任意数目参数和任意名称的方法

转载地址:http://eqici.baihongyu.com/

你可能感兴趣的文章
eclipse js jsp 卡怎么办,解决办法
查看>>
高性能J2EE接口平台设计
查看>>
spring mvc tomcat 线程池的坑
查看>>
JAVA 生成不重复订单号 优化版本 订单号格式为yyyymmdd后面自增
查看>>
mybatis-jpa插件使用教程
查看>>
cas 4.2.7 和 Nginx 整合遇到的问题 登录一会可以一会不可以
查看>>
CAS 单点登出 loginout 解决方案 -- 最靠谱的方案,不是抄的--还是不靠谱大家不要抄了
查看>>
springboot 支持jsp 直接访问jsp办法无需通过controller转发
查看>>
后续框架可以优化的点
查看>>
SpringBoot Logback 配置参数迁移到配置中心 Apollo
查看>>
springboot 自定义webroot的目录
查看>>
springboot springmvc j2ee 做伪静态化 .html 转发到 .jsp
查看>>
我入行以来java框架的几个阶段&论什么是真正的组件开发&项目中部分源码干货分享
查看>>
java-真正面向配置+组件的开发
查看>>
Mybattis Jpa插件简介
查看>>
java编程奇淫技巧之让java帮我们生成java代码后不停服,直接编译为class并且反射为对象直接使用
查看>>
springMVC源码阅读之FORM参数绑定
查看>>
springBoot SpringMVC解决XSS漏洞 -非重写request 支持普通form提交
查看>>
No plugin found for prefix 'install' in the current project解决方案
查看>>
ZUUL2 使用场景
查看>>