gpt4 book ai didi

java - 找不到元素 'aws-context:context-region' 的声明

转载 作者:行者123 更新时间:2023-11-30 05:49:20 25 4
gpt4 key购买 nike

application_context.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:context="http://www.springframework.org/schema/context"
xmlns:aws-context="http://www.springframework.org/schema/aws/cloud/context"
xmlns:p="http://www.springframework.org/schema/p" 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/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/cloud/aws/context
http://www.springframework.org/schema/cloud/aws/spring-cloud-aws-context.xsd">

<aws-context:context-region region="us-west-2"/>

<aws-context:context-resource-loader/>
....</beans>

编译后,我得到:

nested exception is org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 53; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'aws-context:context-region'.

有人可以帮我解决这个问题吗?谢谢

最佳答案

更改自:

http://www.springframework.org/schema/cloud/aws/spring-cloud-aws-context.xsd

致:

http://www.springframework.org/schema/cloud/spring-cloud-aws-context.xsd

但您可以在测试之前检查所有 schemaLocations 链接是否返回 200 ok。如果是 404,您可以在 http://www.springframework.org/schema/cloud/ 下单独找到它们。

关于java - 找不到元素 'aws-context:context-region' 的声明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54226776/

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