Fixed Jackson configuration
This commit is contained in:
parent
0ba5ff8045
commit
9f2aeaa06e
@ -4,10 +4,13 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import ru.dragonestia.picker.api.repository.type.NodeIdentifier;
|
||||
|
||||
import java.beans.Transient;
|
||||
|
||||
public interface INode {
|
||||
|
||||
@NotNull String getIdentifier();
|
||||
|
||||
@Transient
|
||||
default @NotNull NodeIdentifier getIdentifierObject() {
|
||||
return NodeIdentifier.of(getIdentifier());
|
||||
}
|
||||
|
||||
@ -6,18 +6,22 @@ import ru.dragonestia.picker.api.repository.type.NodeIdentifier;
|
||||
import ru.dragonestia.picker.api.repository.type.RoomIdentifier;
|
||||
import ru.dragonestia.picker.api.repository.type.RoomPath;
|
||||
|
||||
import java.beans.Transient;
|
||||
|
||||
public interface IRoom {
|
||||
|
||||
int UNLIMITED_SLOTS = -1;
|
||||
|
||||
@NotNull String getIdentifier();
|
||||
|
||||
@Transient
|
||||
default @NotNull RoomIdentifier getIdentifierObject() {
|
||||
return RoomIdentifier.of(getIdentifier());
|
||||
}
|
||||
|
||||
@NotNull String getNodeIdentifier();
|
||||
|
||||
@Transient
|
||||
default @NotNull NodeIdentifier getNodeIdentifierObject() {
|
||||
return NodeIdentifier.of(getNodeIdentifier());
|
||||
}
|
||||
|
||||
@ -4,10 +4,13 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import ru.dragonestia.picker.api.repository.type.UserIdentifier;
|
||||
|
||||
import java.beans.Transient;
|
||||
|
||||
public interface IUser {
|
||||
|
||||
@NotNull String getIdentifier();
|
||||
|
||||
@Transient
|
||||
default @NotNull UserIdentifier getIdentifierObject() {
|
||||
return UserIdentifier.of(getIdentifier());
|
||||
}
|
||||
|
||||
@ -36,8 +36,7 @@ public class RestTemplate {
|
||||
mapper.setVisibility(mapper.getSerializationConfig().getDefaultVisibilityChecker()
|
||||
.withFieldVisibility(JsonAutoDetect.Visibility.ANY)
|
||||
.withGetterVisibility(JsonAutoDetect.Visibility.NONE)
|
||||
.withSetterVisibility(JsonAutoDetect.Visibility.NONE)
|
||||
.withCreatorVisibility(JsonAutoDetect.Visibility.NONE));
|
||||
.withSetterVisibility(JsonAutoDetect.Visibility.NONE));
|
||||
return mapper;
|
||||
}
|
||||
|
||||
|
||||
@ -14,8 +14,7 @@ public class JacksonConfig {
|
||||
mapper.setVisibility(mapper.getSerializationConfig().getDefaultVisibilityChecker()
|
||||
.withFieldVisibility(JsonAutoDetect.Visibility.ANY)
|
||||
.withGetterVisibility(JsonAutoDetect.Visibility.NONE)
|
||||
.withSetterVisibility(JsonAutoDetect.Visibility.NONE)
|
||||
.withCreatorVisibility(JsonAutoDetect.Visibility.NONE));
|
||||
.withSetterVisibility(JsonAutoDetect.Visibility.NONE));
|
||||
|
||||
return mapper;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user