SSM框架 拦截器 出现“发现了以元素 'mvc:exclude-mapping' 开头的无效内容。应以 '{"http://www.springframework.org/schema/mvc":mapping}' 之一开头”错误
2024-10-21 23:28:37
导致错误位置与代码:
spring-mvc.xml文件中的拦截器配置代码,代码如下:
<mvc:interceptors>
<mvc:interceptor>
<mvc:exclude-mapping path="*/loginCheck" />
<mvc:mapping path="/**" />
<bean class="cn.ssm.tool.LoginInterceptor"></bean>
</mvc:interceptor>
</mvc:interceptors>
错误原因:
正如错误信息所说的,<mvc:interceptor>
中不能以mvc:exclude-mapping开头
解决方法:
不以mvc:exclude-mapping开头即可
纠正后代码:
<mvc:interceptors>
<mvc:interceptor>
<mvc:mapping path="/**" />
<mvc:exclude-mapping path="*/loginCheck" />
<bean class="cn.ssm.tool.LoginInterceptor"></bean>
</mvc:interceptor>
</mvc:interceptors>
最新文章
- WebView 与PC机Chrome配合调试
- 夺命雷公狗—angularjs—7—多条数据的遍历
- 通过restore database时重命名数据库rename database
- C library function - tmpfile()
- tomcat实现文件打开下载功能
- css之clear属性
- C++ Interview - using new and delete to alloc and free memory
- STL入门
- isequal 和startswith 使用
- leetcode 15. 3Sum 双指针
- 巧用百度Site App新组件为企业官网打造移动站
- vsftpd配置seccomp_sandbox=NO
- Python subprocess + timeout的命令执行
- Generation Axe 吉他之夜音乐会-广州站 感受
- golang []byte转string
- 操作系统内存管理之 内部碎片vs外部碎片
- linux源码编译安装OpenCV
- (办公)json报错的解决问题的小经验.
- 异步FIFO的verilog实现与简单验证(调试成功)
- tf.nn.conv2d
热门文章
- Visualization: Pie Chart(可视化:饼图)
- GP232RL国产USB串口如何兼容FT232RL开发资料
- CRON表达式转换成中文
- (1019) rapidsvn 安装
- SVN: E155004: THERE ARE UNFINISHED WORK ITEMS IN &#39;&#39;; RUN &#39;SVN CLEANUP&#39; FIRST
- pytest学习总结
- Keil51单片机解决数字显示不稳的问题
- wake on lan magic packet
- WebApi EF Core 2.1 Code First 设置导航属性,外键
- android kotlin data class的公共参数解决