Skip to content

Commit 8f5c5be

Browse files
committed
update #152 #153
1 parent 0810e1d commit 8f5c5be

File tree

8 files changed

+27
-10
lines changed

8 files changed

+27
-10
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<groupId>com.codingapi.springboot</groupId>
1717
<artifactId>springboot-parent</artifactId>
18-
<version>2.10.16</version>
18+
<version>2.10.17</version>
1919

2020
<url>https://github.com/codingapi/springboot-framewrok</url>
2121
<name>springboot-parent</name>

springboot-starter-data-authorization/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<artifactId>springboot-parent</artifactId>
88
<groupId>com.codingapi.springboot</groupId>
9-
<version>2.10.16</version>
9+
<version>2.10.17</version>
1010
</parent>
1111

1212
<name>springboot-starter-data-authorization</name>

springboot-starter-data-fast/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-parent</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>2.10.16</version>
8+
<version>2.10.17</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

springboot-starter-flow/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<artifactId>springboot-parent</artifactId>
88
<groupId>com.codingapi.springboot</groupId>
9-
<version>2.10.16</version>
9+
<version>2.10.17</version>
1010
</parent>
1111

1212
<name>springboot-starter-flow</name>

springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/service/impl/FlowStartService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private void loadFlowWork() {
6666
flowWork.enableValidate();
6767
}
6868

69-
private void loadFlowBackup() {
69+
private synchronized void loadFlowBackup() {
7070
FlowBackupRepository flowBackupRepository = flowServiceRepositoryHolder.getFlowBackupRepository();
7171
this.flowBackup = flowBackupRepository.getFlowBackupByWorkIdAndVersion(flowWork.getId(), flowWork.getUpdateTime());
7272
if (flowBackup == null) {

springboot-starter-security/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<artifactId>springboot-parent</artifactId>
88
<groupId>com.codingapi.springboot</groupId>
9-
<version>2.10.16</version>
9+
<version>2.10.17</version>
1010
</parent>
1111

1212
<artifactId>springboot-starter-security</artifactId>

springboot-starter/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.codingapi.springboot</groupId>
77
<artifactId>springboot-parent</artifactId>
8-
<version>2.10.16</version>
8+
<version>2.10.17</version>
99
</parent>
1010
<artifactId>springboot-starter</artifactId>
1111

springboot-starter/src/main/java/com/codingapi/springboot/framework/exception/EventException.java

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,35 @@
33
import lombok.Getter;
44

55
import java.util.List;
6-
import java.util.stream.Collectors;
76

87
@Getter
98
public class EventException extends RuntimeException {
109

1110
private final List<Exception> error;
1211

1312
public EventException(List<Exception> error) {
14-
super(error.stream().map(Exception::getMessage).collect(Collectors.joining("\n")));
13+
super(EventException.convert(error));
1514
this.error = error;
1615
for (Exception e : error) {
17-
e.printStackTrace();
16+
this.addSuppressed(e);
1817
}
1918
}
19+
20+
private static String convert(List<Exception> errors){
21+
if (errors == null || errors.isEmpty()) {
22+
return "No errors.";
23+
}
24+
StringBuilder message = new StringBuilder();
25+
message.append("Has ").append(errors.size()).append(" Errors:\n");
26+
int index = 1;
27+
for (Exception exception : errors) {
28+
message.append(index++)
29+
.append(". ")
30+
.append(exception.getClass().getSimpleName())
31+
.append(": ")
32+
.append(exception.getMessage())
33+
.append("\n");
34+
}
35+
return message.toString();
36+
}
2037
}

0 commit comments

Comments
 (0)