gpt4 book ai didi

java - 我想启用矩阵变量,但它显示了消息

转载 作者:行者123 更新时间:2023-12-01 12:20:20 26 4
gpt4 key购买 nike

"<mvc:annotation-driven enable-matrix-variables="true"/>    
<context:component-scan base-package="Controllers" />"

它给我以下错误消息:

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 18 in XML document from ServletContext resource [/WEB-INF/appDispatcher-servlet.xml] is invalid;
nested exception is org.xml.sax.SAXParseException; lineNumber: 18; columnNumber: 59; cvc-complex-type.3.2.2: Attribute 'enable-matrix-variables' is not allowed to appear in element 'mvc:annotation-driven'.

最佳答案

我可以确认 Spring 3.2 下正确的写法是 <mvc:annotation-driven enableMatrixVariables="true" >

这里是 Spring Framework 3.2.4 的工作 xml 文件的摘录

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

<mvc:annotation-driven enableMatrixVariables="true" >

注意对 3.2 模式的引用

关于java - 我想启用矩阵变量,但它显示了消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26709610/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com