Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ The easiest way to get started is by adding the Microsphere Spring BOM (Bill of

| **Branches** | **Purpose** | **Latest Version** |
|--------------|------------------------------------------------|--------------------|
| **0.2.x** | Compatible with Spring Framework 6.0.x - 6.2.x | 0.2.3 |
| **0.1.x** | Compatible with Spring Framework 4.3.x - 5.3.x | 0.1.3 |
| **0.2.x** | Compatible with Spring Framework 6.0.x - 6.2.x | 0.2.4 |
| **0.1.x** | Compatible with Spring Framework 4.3.x - 5.3.x | 0.1.4 |

Then add the specific modules you need:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* during runtime.
* </p>
*
* <h3>Example usage:</h3>
* <h3>Example Usage</h3>
* <pre>
* // Create and publish the event when a bean's property changes
* BeanPropertyChangedEvent event = new BeanPropertyChangedEvent(myBean, "status", oldStatus, newStatus);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1362,7 +1362,8 @@ public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
WebEndpointMapping that = (WebEndpointMapping) o;
return this.negated == that.negated
return this.kind == that.kind
&& this.negated == that.negated
&& arrayEquals(patterns, that.patterns)
&& arrayEquals(methods, that.methods)
&& arrayEquals(params, that.params)
Expand Down Expand Up @@ -1418,6 +1419,7 @@ public String toString() {
public String toJSON() {
StringBuilder stringBuilder = new StringBuilder(LEFT_CURLY_BRACE).append(LINE_SEPARATOR);
append(stringBuilder, "id", this.id);
append(stringBuilder, "kind", this.kind, COMMA, LINE_SEPARATOR);
append(stringBuilder, "negated", this.negated, COMMA, LINE_SEPARATOR);
append(stringBuilder, "patterns", this.patterns, COMMA, LINE_SEPARATOR);
append(stringBuilder, "methods", this.methods, COMMA, LINE_SEPARATOR);
Expand All @@ -1438,6 +1440,11 @@ private void append(StringBuilder appendable, String name, boolean value, String
JSONUtils.append(appendable, name, value);
}

private void append(StringBuilder appendable, String name, Kind kind, String... prefixes) {
append(prefixes, appendable);
JSONUtils.append(appendable, name, kind);
}

private void append(StringBuilder appendable, String name, String[] values, String... prefixes) {
if (isEmpty(values)) {
return;
Expand All @@ -1451,4 +1458,4 @@ private void append(String[] values, StringBuilder appendable) {
appendable.append(values[i]);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,9 @@ public void testEquals() {
assertNotEquals(mapping, null);
assertNotEquals(mapping, this);

// equals with different kinds
assertNotEquals(mapping, minBuilder(FILTER).build());

// equals with different patterns
assertNotEquals(mapping, minServletBuilder().pattern("/**").build());

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"id":1,
"kind":"CUSTOMIZED",
"negated":true,
"patterns":["/a","/b","/c"],
"methods":["GET","POST"],
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</scm>

<properties>
<revision>0.1.3-SNAPSHOT</revision>
<revision>0.1.4-SNAPSHOT</revision>
</properties>

<modules>
Expand Down