forked from rbridomzmr/ShadowSocks-Share
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: xxx <x@x.x>
- Loading branch information
xxx
committed
Jan 6, 2018
1 parent
171c5a4
commit 59b47b6
Showing
6 changed files
with
41 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/main/java/com/example/ShadowSocksShare/service/listener/ApplicationStartupListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.example.ShadowSocksShare.service.listener; | ||
|
||
import com.example.ShadowSocksShare.service.tasks.ShadowSocksTasks; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.context.event.ContextRefreshedEvent; | ||
import org.springframework.context.event.EventListener; | ||
import org.springframework.stereotype.Component; | ||
|
||
/** | ||
* 系统启动 监听事件 | ||
*/ | ||
@Slf4j | ||
@Component | ||
public class ApplicationStartupListener { | ||
@Autowired | ||
private ShadowSocksTasks shadowSocksTasks; | ||
|
||
|
||
/** | ||
* 系统启动 监听事件 | ||
*/ | ||
@EventListener | ||
public void handleOrderStateChange(ContextRefreshedEvent contextRefreshedEvent) { | ||
log.debug(contextRefreshedEvent.toString()); | ||
shadowSocksTasks.runAll(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters