File tree Expand file tree Collapse file tree 8 files changed +27
-10
lines changed
springboot-starter-data-authorization
springboot-starter-data-fast
src/main/java/com/codingapi/springboot/flow/service/impl
springboot-starter-security
src/main/java/com/codingapi/springboot/framework/exception Expand file tree Collapse file tree 8 files changed +27
-10
lines changed Original file line number Diff line number Diff line change 15
15
16
16
<groupId >com.codingapi.springboot</groupId >
17
17
<artifactId >springboot-parent</artifactId >
18
- <version >2.10.16 </version >
18
+ <version >2.10.17 </version >
19
19
20
20
<url >https://github.com/codingapi/springboot-framewrok</url >
21
21
<name >springboot-parent</name >
Original file line number Diff line number Diff line change 6
6
<parent >
7
7
<artifactId >springboot-parent</artifactId >
8
8
<groupId >com.codingapi.springboot</groupId >
9
- <version >2.10.16 </version >
9
+ <version >2.10.17 </version >
10
10
</parent >
11
11
12
12
<name >springboot-starter-data-authorization</name >
Original file line number Diff line number Diff line change 5
5
<parent >
6
6
<artifactId >springboot-parent</artifactId >
7
7
<groupId >com.codingapi.springboot</groupId >
8
- <version >2.10.16 </version >
8
+ <version >2.10.17 </version >
9
9
</parent >
10
10
<modelVersion >4.0.0</modelVersion >
11
11
Original file line number Diff line number Diff line change 6
6
<parent >
7
7
<artifactId >springboot-parent</artifactId >
8
8
<groupId >com.codingapi.springboot</groupId >
9
- <version >2.10.16 </version >
9
+ <version >2.10.17 </version >
10
10
</parent >
11
11
12
12
<name >springboot-starter-flow</name >
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ private void loadFlowWork() {
66
66
flowWork .enableValidate ();
67
67
}
68
68
69
- private void loadFlowBackup () {
69
+ private synchronized void loadFlowBackup () {
70
70
FlowBackupRepository flowBackupRepository = flowServiceRepositoryHolder .getFlowBackupRepository ();
71
71
this .flowBackup = flowBackupRepository .getFlowBackupByWorkIdAndVersion (flowWork .getId (), flowWork .getUpdateTime ());
72
72
if (flowBackup == null ) {
Original file line number Diff line number Diff line change 6
6
<parent >
7
7
<artifactId >springboot-parent</artifactId >
8
8
<groupId >com.codingapi.springboot</groupId >
9
- <version >2.10.16 </version >
9
+ <version >2.10.17 </version >
10
10
</parent >
11
11
12
12
<artifactId >springboot-starter-security</artifactId >
Original file line number Diff line number Diff line change 5
5
<parent >
6
6
<groupId >com.codingapi.springboot</groupId >
7
7
<artifactId >springboot-parent</artifactId >
8
- <version >2.10.16 </version >
8
+ <version >2.10.17 </version >
9
9
</parent >
10
10
<artifactId >springboot-starter</artifactId >
11
11
Original file line number Diff line number Diff line change 3
3
import lombok .Getter ;
4
4
5
5
import java .util .List ;
6
- import java .util .stream .Collectors ;
7
6
8
7
@ Getter
9
8
public class EventException extends RuntimeException {
10
9
11
10
private final List <Exception > error ;
12
11
13
12
public EventException (List <Exception > error ) {
14
- super (error . stream (). map ( Exception :: getMessage ). collect ( Collectors . joining ( " \n " ) ));
13
+ super (EventException . convert ( error ));
15
14
this .error = error ;
16
15
for (Exception e : error ) {
17
- e . printStackTrace ( );
16
+ this . addSuppressed ( e );
18
17
}
19
18
}
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
+ }
20
37
}
You can’t perform that action at this time.
0 commit comments