我嘗試組織動態@JsonIgnore屬性時,我將java對象轉換爲json-string。在example 它在下一個作品 for(codehause傑克遜) ObjectMapper oMapper = new ObjectMapper(); oMapper。 setSerializationConfig(...fasterxml jackson:沒有必要的方法來使用@JsonView功能
或example爲fasterxml objectMapper.getSerializationConfig()setSerializationView(
問題:粗體方法是缺席我傑克遜:
pom.xml
<jackson.version>2.1.1</jackson.version>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>