小编sre*_*ree的帖子

Jackson UnrecognizedPropertyException

我正在尝试将 JsonString 转换为 Java 对象。

JSON 对象

{
"action": "added",
"data": {
    "Quote": {
        "TotalDiscountsAmount": 0,
        "Id": "test123"
    },
    "Owner": {
        "Username": "00000000",
        "Id": "00000000"
    },
    "Discount_Amount__c": 0,
    "Base_List_Price__c": 574.88,
    "TotalList": 574.88,
    "Id": "000000",
    "ExtendedTotalList": 574.88,
    "BaseListPrice": 474.88
}
}
Run Code Online (Sandbox Code Playgroud)

我的 POJO:

AddtocartJson.java

package com.product.json;

import javax.annotation.Generated;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

@JsonInclude(JsonInclude.Include.NON_NULL)
@Generated("org.jsonschema2pojo")
@JsonPropertyOrder({
  "action",
  "data"
})
public class AddToCartJson {
    @JsonProperty("action")
    private String action;
    @JsonProperty("data")
    private Data data;

    @JsonProperty("action")
    public String getAction() {
        return action;
    }

    @JsonProperty("action") …
Run Code Online (Sandbox Code Playgroud)

java spring json jackson

5
推荐指数
2
解决办法
1万
查看次数

玉兰中的公众和作者之间的区别

我试图找出 magnolia CMS 中 public 和 author 模块之间的区别。

我正在尝试使用开花将 spring mvc 集成到玉兰中。

我需要使用哪个模块是公共模块还是作者模块?

magnolia

3
推荐指数
1
解决办法
1283
查看次数

sftp的Spring集成

如何使用SFTP适配器将文件从本地系统移动到远程FTP.我正在浏览这些示例,所有人都提到将文件从远程FTP复制到本地计算机.

我需要将文件从本地机器移动到远程系统文件夹.

<?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:int="http://www.springframework.org/schema/integration"
xmlns:int-sftp="http://www.springframework.org/schema/integration/sftp"
xmlns:file="http://www.springframework.org/schema/integration/file"
xsi:schemaLocation="
    http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/integration
    http://www.springframework.org/schema/integration/spring-integration.xsd
    http://www.springframework.org/schema/integration/sftp
    http://www.springframework.org/schema/integration/sftp/spring-integration-sftp-    2.2.xsd
    http://www.springframework.org/schema/integration/file
    http://www.springframework.org/schema/integration/file/spring-integration-file-2.2.xsd">

<bean id="sftpSessionFactory" class="org.springframework.integration.sftp.session.DefaultSftpSessionFactory">
<property name="host" value="localhost"/>
<property name="user" value="user01"/>
<property name="password" value="abc123"/>
<property name="port" value="990"/>
</bean>

<int:channel id="sftpChannel"/>

<file:inbound-channel-adapter directory="#{T(System).getProperty('java.io.tmpdir')}" id="fileInbound"
                          channel="sftpChannel" filename-pattern="*.xml">
<int:poller fixed-rate="1000" max-messages-per-poll="100"/>
</file:inbound-channel-adapter>

<int-sftp:outbound-channel-adapter id="sftpOutboundAdapter" session-factory="sftpSessionFactory"
                               channel="sftpChannel" charset="UTF-8" remote-directory="/"
                               remote-file-separator="/"/>

</beans>

<file:outbound-channel-adapter id="moveProcessedFile"
    channel="sftpChannel"
    directory="file:#{configurationService.configuration.getProperty('acal.jde.publish.folder')}/processed"
    delete-source-files="true" order="2" />
Run Code Online (Sandbox Code Playgroud)

我试过这个,但无法将文件移动到已处理的文件夹.

spring sftp spring-integration

1
推荐指数
1
解决办法
9033
查看次数

标签 统计

spring ×2

jackson ×1

java ×1

json ×1

magnolia ×1

sftp ×1

spring-integration ×1