File tree Expand file tree Collapse file tree 6 files changed +19
-17
lines changed
springboot-starter-data-fast
springboot-starter-id-generator
springboot-starter-security-jwt
src/main/java/com/codingapi/springboot/framework/trigger Expand file tree Collapse file tree 6 files changed +19
-17
lines changed Original file line number Diff line number Diff line change 1212
1313 <groupId >com.codingapi.springboot</groupId >
1414 <artifactId >springboot-parent</artifactId >
15- <version >2.1.3 </version >
15+ <version >2.1.4 </version >
1616
1717 <url >https://github.com/codingapi/springboot-framewrok</url >
1818 <name >springboot-parent</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.1.3 </version >
8+ <version >2.1.4 </version >
99 </parent >
1010 <modelVersion >4.0.0</modelVersion >
1111
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.1.3 </version >
8+ <version >2.1.4 </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.1.3 </version >
9+ <version >2.1.4 </version >
1010 </parent >
1111
1212 <artifactId >springboot-starter-security-jwt</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.1.3 </version >
8+ <version >2.1.4 </version >
99 </parent >
1010 <artifactId >springboot-starter</artifactId >
1111
Original file line number Diff line number Diff line change @@ -71,19 +71,21 @@ private Class<? extends Trigger> getTriggerClass(Class<?> handler){
7171 public void trigger (Trigger trigger ){
7272 Class <? extends Trigger > clazz = trigger .getClass ();
7373 List <TriggerHandler > triggerHandlerList = triggers .get (clazz );
74- for (TriggerHandler handler :triggerHandlerList ){
75- Class <? extends Trigger > triggerClass = getTriggerClass (handler .getClass ());
76- if (triggerClass .equals (clazz )) {
77- try {
78- boolean canTrigger = handler .preTrigger (trigger );
79- if (canTrigger ) {
80- handler .trigger (trigger );
74+ if (triggerHandlerList !=null ) {
75+ for (TriggerHandler handler : triggerHandlerList ) {
76+ Class <? extends Trigger > triggerClass = getTriggerClass (handler .getClass ());
77+ if (triggerClass .equals (clazz )) {
78+ try {
79+ boolean canTrigger = handler .preTrigger (trigger );
80+ if (canTrigger ) {
81+ handler .trigger (trigger );
82+ }
83+ if (handler .remove (trigger , canTrigger )) {
84+ triggerHandlerList .remove (handler );
85+ }
86+ } catch (Exception e ) {
87+ log .warn ("trigger error" , e );
8188 }
82- if (handler .remove (trigger ,canTrigger )) {
83- triggerHandlerList .remove (handler );
84- }
85- }catch (Exception e ){
86- log .warn ("trigger error" ,e );
8789 }
8890 }
8991 }
You can’t perform that action at this time.
0 commit comments