我正在使用以下配置在spring集成中创建api端点。
<int-http:inbound-gateway
request-channel="httpProjectRequest"
reply-channel="httpProjectResponce" supported-methods="GET"
path="/project/{key}" payload-expression="#pathVariables.key">
<int-http:request-mapping consumes="application/json" produces="application/json"/>
</int-http:inbound-gateway>
<int:service-activator
ref="projectAPI"
method="get"
input-channel="httpProjectRequest"
output-channel="httpProjectResponce"/>
我遇到的问题是,当我在/project/DFV-1.1
网址上以“密钥”值发送GET请求时,我得到DFV-1
,当我在密钥值/project/DFV-1.1.1
上发送GET请求时得到DFV-1.1
为什么它忽略了最后一个点之后的值。
答案 0 :(得分:0)
请配置像:
这样的beanuseSuffixPatternMatch
/**
* Whether to use suffix pattern match (".*") when matching patterns to
* requests. If enabled a method mapped to "/users" also matches to "/users.*".
* <p>The default value is {@code true}.
* <p>Also see {@link #setUseRegisteredSuffixPatternMatch(boolean)} for
* more fine-grained control over specific suffixes to allow.
*/
public void setUseSuffixPatternMatch(boolean useSuffixPatternMatch) {
说明:
this.knex(this.table)
.where(this.column_data, data)
.where("archive", 1)