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 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 >
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff 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 ) {
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 33import lombok .Getter ;
44
55import java .util .List ;
6- import java .util .stream .Collectors ;
76
87@ Getter
98public 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}
You can’t perform that action at this time.
0 commit comments