Skip to content

Update ServerListener.java#69

Merged
xlorne merged 1 commit intocodingapi:masterfrom
ahao888:patch-1
Mar 16, 2018
Merged

Update ServerListener.java#69
xlorne merged 1 commit intocodingapi:masterfrom
ahao888:patch-1

Conversation

@ahao888
Copy link
Contributor

@ahao888 ahao888 commented Mar 16, 2018

springcloud 打成war包执行的时候,并不走EmbeddedServletContainerInitializedEvent这个事件,所以可以监听ApplicationReadyEvent事件,将ServerListener,InitService注入新的监听器中启动客户端。springcloud的端口号一般都会配置,所以可以从配置文件中获取。第一次用github不知道对不对。

springcloud 打成war包执行的时候,并不走EmbeddedServletContainerInitializedEvent这个事件,所以可以监听ApplicationReadyEvent事件,将ServerListener,InitService注入新的监听器中启动客户端。springcloud的端口号一般都会配置,所以可以从配置文件中获取。
@xlorne xlorne merged commit 4bc4ef3 into codingapi:master Mar 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants