zoukankan      html  css  js  c++  java
  • SSM商城系统开发笔记-问题01-通配符的匹配很全面, 但无法找到元素 'mvc:annotation-driven' 的声明。

    配置搭建完后进行Post请求测试时报错:

    Caused by: org.xml.sax.SAXParseException; lineNumber: 14; columnNumber: 29; cvc-complex-type.2.4.c: 通配符的匹配很全面, 但无法找到元素 'mvc:annotation-driven' 的声明


    查看springmvc配置文件 spring-web.xml如下,发现声明mvc了但没有配置

    <?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:mvc="http://www.springframework.org/schema/mvc"
           xmlns:context="http://www.springframework.org/schema/context"
           xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
            http://www.springframework.org/schema/context
            http://www.springframework.org/schema/context/spring-context.xsd">

    加上配置后

    <?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:mvc="http://www.springframework.org/schema/mvc"
           xmlns:context="http://www.springframework.org/schema/context"
           xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
            http://www.springframework.org/schema/mvc
            http://www.springframework.org/schema/mvc/spring-mvc.xsd
            http://www.springframework.org/schema/context
            http://www.springframework.org/schema/context/spring-context.xsd">
  • 相关阅读:
    MySQL 重要参数 innodb_flush_log_at_trx_commit 和 sync_binlog
    mysql物理日志和逻辑日志_mysql物理日志redo log和逻辑日志 binlog
    Navicat Premium for Mac 破解版
    qps是什么
    如何实现扫码登录功能?
    goland debug
    [Golang] 初探之 sync.Once
    go语言:sync.Once的用法
    Golang进程权限调度包runtime三大函数Gosched,Goexit,GOMaXPROCS
    Go unsafe 包之内存布局
  • 原文地址:https://www.cnblogs.com/Z-Fanghan/p/6723785.html
Copyright © 2011-2022 走看看