【发布时间】:2019-05-14 06:23:43
【问题描述】:
在 Eclipse 中,我有一个 xml,但它有一些错误,例如: 在此行找到多个注释: - cvc-pattern-valid:值 'pf-realtime-security' 对于模式 '($||\p{L})(\p{L}|\p{Nd} ||$)*' 用于“null”类型。 - cvc-complex-type.2.2:元素 'name' 必须没有元素 [children],并且值必须有效。 在此行找到多个注释: - cvc-complex-type.3.2.2:属性“缓存级别”不允许出现在元素“int-jms:消息驱动通道适配器”中。 - cvc-complex-type.3.2.2:属性 'subscription-durable' 不允许出现在元素 'int-jms:message-driven-channel- 适配器'。 - cvc-complex-type.3.2.2:属性 'durable-subscription-name' 不允许出现在元素 'int-jms:message-driven-channel- 适配器”。
这是一个带有旧项目的一些xml文件的spring boot项目,我不知道旧项目中是否存在同样的问题。但是我的项目总是有这个问题。
<web-fragment id="WebFragment_ID" version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd">
<display-name>PF Realtime Services Web Application - Security Module</display-name>
<name>pf-realtime-security</name>
<int-jms:message-driven-channel-adapter connection-factory="primeLocateConnectionFactory"
destination="primeLocateTopic" acknowledge="auto" auto-startup="true"
cache-level="1" channel="primeLocateInChannel" pub-sub-domain="true"
durable-subscription-name="prime-locate-#{systemProperties['realtime.hostname']}" subscription-durable="true"/>
我预计这里的 xml 文件应该没有错误。
【问题讨论】: