mirror of
https://gitee.com/dcren/initializr.git
synced 2025-11-28 09:22:41 +08:00
Ensure configuration can be serialized
Closes gh-506
This commit is contained in:
@@ -425,6 +425,7 @@ public class Dependency extends MetadataElement implements Describable {
|
||||
*/
|
||||
private String version;
|
||||
|
||||
@JsonIgnore
|
||||
private VersionRange range;
|
||||
|
||||
public String getGroupId() {
|
||||
|
||||
@@ -20,6 +20,8 @@ import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
@@ -55,6 +57,7 @@ public class VersionProperty implements Serializable, Comparable<VersionProperty
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String toStandardFormat() {
|
||||
return this.property;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ initializr:
|
||||
my-api-bom:
|
||||
groupId: org.acme
|
||||
artifactId: my-api-bom
|
||||
versionProperty: my-api.version
|
||||
additionalBoms: ['my-api-dependencies-bom']
|
||||
mappings:
|
||||
- versionRange: "[1.0.0.RELEASE,1.1.6.RELEASE)"
|
||||
|
||||
Reference in New Issue
Block a user