We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
现在的executor需要依赖容器,可以考虑打成jar,在JVM中跑,脱离对web容器的依赖:
我昨天实现了一下:
通过maven 的maven-shade-plugin插件,在JVM中直接跑
main函数:
new Thread() { public void run() { synchronized (StatisticApp.class) { new ClassPathXmlApplicationContext("classpath:di-statistic.springContext.xml"); } try { while (true) { LOG.info(GlobalConst.LogFix.LOG_FIX_PREFIX + "di-statistic is running...."); Thread.sleep(THREAD_SLEEP_TIME); } } catch (InterruptedException e) { LOG.error(GlobalConst.LogFix.LOG_FIX_PREFIX + "di-statistic throws exception:"); LOG.error(GlobalExceptionMsg.getExceptionMessage(e)); } } }.start();
The text was updated successfully, but these errors were encountered:
@whcWang 代码量大的话,建议使用maven-assembly-plugin插件。
Sorry, something went wrong.
赞! 哈哈,这下大家清楚为什么执行器需要内嵌jetty了吧?
执行器可否做成不内嵌jetty?可否做成一个jar包依赖(比如叫xxl-job-executor-server),需要的时候引入,不需要的时候可用使用应用自身的容器。 目前我的项目是用的springboot,已经内嵌了tomcat,不想再内嵌一个jetty(虽然项目能正常运行)。
嵌套jetty 就是想利用它里面的nio的特性吧。
No branches or pull requests
现在的executor需要依赖容器,可以考虑打成jar,在JVM中跑,脱离对web容器的依赖:
我昨天实现了一下:
通过maven 的maven-shade-plugin插件,在JVM中直接跑
main函数:
The text was updated successfully, but these errors were encountered: