Skip to content

Commit cec5abb

Browse files
authored
Merge pull request #137 from microsphere-projects/dev-1.x
Release 0.1.4
2 parents 3f33c6c + a235d90 commit cec5abb

File tree

6 files changed

+17
-6
lines changed

6 files changed

+17
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ The easiest way to get started is by adding the Microsphere Spring BOM (Bill of
6565

6666
| **Branches** | **Purpose** | **Latest Version** |
6767
|--------------|------------------------------------------------|--------------------|
68-
| **0.2.x** | Compatible with Spring Framework 6.0.x - 6.2.x | 0.2.3 |
69-
| **0.1.x** | Compatible with Spring Framework 4.3.x - 5.3.x | 0.1.3 |
68+
| **0.2.x** | Compatible with Spring Framework 6.0.x - 6.2.x | 0.2.4 |
69+
| **0.1.x** | Compatible with Spring Framework 4.3.x - 5.3.x | 0.1.4 |
7070

7171
Then add the specific modules you need:
7272

microsphere-spring-context/src/main/java/io/microsphere/spring/context/event/BeanPropertyChangedEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* during runtime.
2929
* </p>
3030
*
31-
* <h3>Example usage:</h3>
31+
* <h3>Example Usage</h3>
3232
* <pre>
3333
* // Create and publish the event when a bean's property changes
3434
* BeanPropertyChangedEvent event = new BeanPropertyChangedEvent(myBean, "status", oldStatus, newStatus);

microsphere-spring-web/src/main/java/io/microsphere/spring/web/metadata/WebEndpointMapping.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,8 @@ public boolean equals(Object o) {
13621362
if (this == o) return true;
13631363
if (o == null || getClass() != o.getClass()) return false;
13641364
WebEndpointMapping that = (WebEndpointMapping) o;
1365-
return this.negated == that.negated
1365+
return this.kind == that.kind
1366+
&& this.negated == that.negated
13661367
&& arrayEquals(patterns, that.patterns)
13671368
&& arrayEquals(methods, that.methods)
13681369
&& arrayEquals(params, that.params)
@@ -1418,6 +1419,7 @@ public String toString() {
14181419
public String toJSON() {
14191420
StringBuilder stringBuilder = new StringBuilder(LEFT_CURLY_BRACE).append(LINE_SEPARATOR);
14201421
append(stringBuilder, "id", this.id);
1422+
append(stringBuilder, "kind", this.kind, COMMA, LINE_SEPARATOR);
14211423
append(stringBuilder, "negated", this.negated, COMMA, LINE_SEPARATOR);
14221424
append(stringBuilder, "patterns", this.patterns, COMMA, LINE_SEPARATOR);
14231425
append(stringBuilder, "methods", this.methods, COMMA, LINE_SEPARATOR);
@@ -1438,6 +1440,11 @@ private void append(StringBuilder appendable, String name, boolean value, String
14381440
JSONUtils.append(appendable, name, value);
14391441
}
14401442

1443+
private void append(StringBuilder appendable, String name, Kind kind, String... prefixes) {
1444+
append(prefixes, appendable);
1445+
JSONUtils.append(appendable, name, kind);
1446+
}
1447+
14411448
private void append(StringBuilder appendable, String name, String[] values, String... prefixes) {
14421449
if (isEmpty(values)) {
14431450
return;
@@ -1451,4 +1458,4 @@ private void append(String[] values, StringBuilder appendable) {
14511458
appendable.append(values[i]);
14521459
}
14531460
}
1454-
}
1461+
}

microsphere-spring-web/src/test/java/io/microsphere/spring/web/metadata/WebEndpointMappingTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,9 @@ public void testEquals() {
519519
assertNotEquals(mapping, null);
520520
assertNotEquals(mapping, this);
521521

522+
// equals with different kinds
523+
assertNotEquals(mapping, minBuilder(FILTER).build());
524+
522525
// equals with different patterns
523526
assertNotEquals(mapping, minServletBuilder().pattern("/**").build());
524527

microsphere-spring-web/src/test/resources/META-INF/web-mapping-descriptor.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"id":1,
3+
"kind":"CUSTOMIZED",
34
"negated":true,
45
"patterns":["/a","/b","/c"],
56
"methods":["GET","POST"],

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
</scm>
5353

5454
<properties>
55-
<revision>0.1.3-SNAPSHOT</revision>
55+
<revision>0.1.4-SNAPSHOT</revision>
5656
</properties>
5757

5858
<modules>

0 commit comments

Comments
 (0)