1、使用spring mvc 自定义注解 但是一直无法切入
解决方式:将<aop:aspectj-autoproxy proxy-target-class="true"/>或者<aop:aspectj-autoproxy />放到spring mvc的配置文件中而不是spring的配置文件中
即
org.springframework.web.servlet.
DispatcherServlet中contextConfigLocation对应的配置文件
2、发布好了之后发现 访问前段页面正常,但是任何接口都是404
解决方式 : 虽然没有报任何错误,但是 很明显后端发布不成功,原因是 spring mvc的配置文件中<mvc:annotation-driven />要放到<context:component-scan>前面
即先读取spring mvc的配置 再读取spring的配置
3、org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 27; cvc-complex-type.2.4.c: 通配符的匹配很全面, 但无法找到元素 'aop:aspectj-autoproxy' 的声明
xml文件缺少头信息引入
4、spring mvc 返回对象信息 报找不到对象
没有引入json相关jar