在尚学堂的代码里idea报了这样的错,看网上说都是aopliance.jar和aopliance-alpha.jar包起了冲突,可是我压根都没有找到这两个包,我直接是用spring-web包封装好的,找了半天最后终于找到了。
(下面的配置已经改正)
<?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:context="http://www.springframework.org/schema/context" 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/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd">
这是我applicatino-context.xml配置文档的首部其实是tx依赖写错了改为正确的就好了,改成xmlns:tx="http://www.springframework.org/schema/tx"