Spring 属性 无法在 HTTPS 连接器上识别
Spring Property not recognised on HTTPS Connector
我正在尝试在 Mule 中创建一个 HTTPS 连接器,以便我可以将 HTTPS 端点作为流程的一部分进行调用。但是,当我尝试添加 sslType
spring 属性 时,出现错误。
我有一个 HTTPS 连接器定义如下:
<mule xmlns:db="http://www.mulesoft.org/schema/mule/db"
xmlns:core="http://www.mulesoft.org/schema/mule/core"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:https="http://www.mulesoft.org/schema/mule/https"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jms="http://www.mulesoft.org/schema/mule/jms"
xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.5.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:data-mapper="http://www.mulesoft.org/schema/mule/ee/data-mapper"
xmlns:domain="http://www.mulesoft.org/schema/mule/ee/domain"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/ee/domain http://www.mulesoft.org/schema/mule/ee/domain/current/mule-domain-ee.xsd
http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-current.xsd
http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/ee/data-mapper http://www.mulesoft.org/schema/mule/ee/data-mapper/current/mule-data-mapper.xsd
http://www.mulesoft.org/schema/mule/https http://www.mulesoft.org/schema/mule/https/current/mule-https.xsd">
...
<https:connector name="HTTPSConnector" doc:name="HTTPS-Connector"
cookieSpec="netscape" validateConnections="true" sendBufferSize="0" receiveBufferSize="0" receiveBacklog="0"
clientSoTimeout="${service.timeout}" serverSoTimeout="60000" socketSoLinger="0">
<spring:property name="sslType" value="TLSv1.2" />
</https:connector>
...
Mule 抛出错误:
org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'spring:property'.
One of '{"http://www.mulesoft.org/schema/mule/core":service-overrides, "http://www.mulesoft.org/schema/mule/https":tls-client, "http://www.mulesoft.org/schema/mule/https":tls-key-store, "http://www.mulesoft.org/schema/mule/https":tls-server, "http://www.mulesoft.org/schema/mule/https":tls-protocol-handler}' is expected.
我需要做哪些改变才能让这个 属性 得到认可?
如果您使用的是 3.5.2 版本,它对我 运行 没有任何问题。也许省略的片段中还有其他内容?如果 <https:connector>
元素中的其他配置未显示在共享的代码段中,请确保 `spring:属性 是第一个。
请注意,即使它有效,您也可能会发现一些与 SSL 引擎和 Java SSL 支持相关的其他问题,以使其与 TLS 1.2 一起使用。例如 3.5.2 仅支持 Java 7。您可能会发现一些错误,在 https://help.mulesoft.com/s/article/Setting-the-TLS-version-for-the-legacy-HTTPS-connector 中提到。 Mule 3.5 和 Java 7 都已停产。
如果您使用的是当前的 Mule 3 版本,建议使用 Mule 3.9.5 作为目前最新最好的版本,然后默认支持 TLS 1.2。与 Mule 4.x 相同。话虽如此,您使用的旧版 HTTP 连接器已被弃用多年,建议使用新的 HTTP Listener/HTTP 请求器来替代它。
我正在尝试在 Mule 中创建一个 HTTPS 连接器,以便我可以将 HTTPS 端点作为流程的一部分进行调用。但是,当我尝试添加 sslType
spring 属性 时,出现错误。
我有一个 HTTPS 连接器定义如下:
<mule xmlns:db="http://www.mulesoft.org/schema/mule/db"
xmlns:core="http://www.mulesoft.org/schema/mule/core"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:https="http://www.mulesoft.org/schema/mule/https"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jms="http://www.mulesoft.org/schema/mule/jms"
xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.5.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:data-mapper="http://www.mulesoft.org/schema/mule/ee/data-mapper"
xmlns:domain="http://www.mulesoft.org/schema/mule/ee/domain"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/ee/domain http://www.mulesoft.org/schema/mule/ee/domain/current/mule-domain-ee.xsd
http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-current.xsd
http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/ee/data-mapper http://www.mulesoft.org/schema/mule/ee/data-mapper/current/mule-data-mapper.xsd
http://www.mulesoft.org/schema/mule/https http://www.mulesoft.org/schema/mule/https/current/mule-https.xsd">
...
<https:connector name="HTTPSConnector" doc:name="HTTPS-Connector"
cookieSpec="netscape" validateConnections="true" sendBufferSize="0" receiveBufferSize="0" receiveBacklog="0"
clientSoTimeout="${service.timeout}" serverSoTimeout="60000" socketSoLinger="0">
<spring:property name="sslType" value="TLSv1.2" />
</https:connector>
...
Mule 抛出错误:
org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'spring:property'.
One of '{"http://www.mulesoft.org/schema/mule/core":service-overrides, "http://www.mulesoft.org/schema/mule/https":tls-client, "http://www.mulesoft.org/schema/mule/https":tls-key-store, "http://www.mulesoft.org/schema/mule/https":tls-server, "http://www.mulesoft.org/schema/mule/https":tls-protocol-handler}' is expected.
我需要做哪些改变才能让这个 属性 得到认可?
如果您使用的是 3.5.2 版本,它对我 运行 没有任何问题。也许省略的片段中还有其他内容?如果 <https:connector>
元素中的其他配置未显示在共享的代码段中,请确保 `spring:属性 是第一个。
请注意,即使它有效,您也可能会发现一些与 SSL 引擎和 Java SSL 支持相关的其他问题,以使其与 TLS 1.2 一起使用。例如 3.5.2 仅支持 Java 7。您可能会发现一些错误,在 https://help.mulesoft.com/s/article/Setting-the-TLS-version-for-the-legacy-HTTPS-connector 中提到。 Mule 3.5 和 Java 7 都已停产。
如果您使用的是当前的 Mule 3 版本,建议使用 Mule 3.9.5 作为目前最新最好的版本,然后默认支持 TLS 1.2。与 Mule 4.x 相同。话虽如此,您使用的旧版 HTTP 连接器已被弃用多年,建议使用新的 HTTP Listener/HTTP 请求器来替代它。