Closed aileennian closed 6 years ago
你好,调度中心迁移SpringBoot已经在排期,预计在2.0发布。 在此之前,还会发一版 1.9.2 ,可以先稍等下。
哦。 我已经修改OK了。 源代码不变,只要修改如下信息即可: 不过你是官方的,一定要按照Springboot的编写风络将代码写的很优美的话,我这个方法不适合。
1、增加JobApplication.java
import org.springframework.boot.Banner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ImportResource;
@SpringBootApplication //@EnableAutoConfiguration //@Configuration @ImportResource(locations={"classpath:spring/applicationcontext-syx-job-admin.xml","classpath:spring/springmvc-context.xml","classpath:spring/applicationcontext-base.xml"}) public class JobApplication {
public static void main(String[] args) { SpringApplication app = new SpringApplication(JobApplication.class); // app.setAddCommandLineProperties(false); // app.addListeners(new MyAppListener()); app.setBannerMode(Banner.Mode.CONSOLE); app.run(args); // SpringApplication.run(SampleTomcatSslApplication.class, args);
}
}
import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.support.SpringBootServletInitializer;
/**
3.application.properties spring.application.name=xxxx server.port=8080
aileen.nian
发件人: 许雪里 发送时间: 2018-04-28 17:08 收件人: xuxueli/xxl-job 抄送: 念小美; Author 主题: Re: [xuxueli/xxl-job] 如何贡献代码, 我可以帮你们将spring mvc改为springboot (#342) 你好,调度中心迁移SpringBoot已经在排期,预计在2.0发布。 在此之前,还会发一版 1.9.2 ,可以先稍等下。 ― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
但这样编写的话,可以保证你的spring mvc的代码和spring boot保持同一套。
aileen.nian
发件人: nianxl@sohu.com 发送时间: 2018-05-01 13:37 收件人: xuxueli/xxl-job 主题: Re: Re: [xuxueli/xxl-job] 如何贡献代码, 我可以帮你们将spring mvc改为springboot (#342) 哦。 我已经修改OK了。 源代码不变,只要修改如下信息即可: 不过你是官方的,一定要按照Springboot的编写风络将代码写的很优美的话,我这个方法不适合。
1、增加JobApplication.java
import org.springframework.boot.Banner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ImportResource;
@SpringBootApplication //@EnableAutoConfiguration //@Configuration @ImportResource(locations={"classpath:spring/applicationcontext-syx-job-admin.xml","classpath:spring/springmvc-context.xml","classpath:spring/applicationcontext-base.xml"}) public class JobApplication {
public static void main(String[] args) { SpringApplication app = new SpringApplication(JobApplication.class); // app.setAddCommandLineProperties(false); // app.addListeners(new MyAppListener()); app.setBannerMode(Banner.Mode.CONSOLE); app.run(args); // SpringApplication.run(SampleTomcatSslApplication.class, args);
}
}
import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.support.SpringBootServletInitializer;
/**
3.application.properties spring.application.name=xxxx server.port=8080
aileen.nian
发件人: 许雪里 发送时间: 2018-04-28 17:08 收件人: xuxueli/xxl-job 抄送: 念小美; Author 主题: Re: [xuxueli/xxl-job] 如何贡献代码, 我可以帮你们将spring mvc改为springboot (#342) 你好,调度中心迁移SpringBoot已经在排期,预计在2.0发布。 在此之前,还会发一版 1.9.2 ,可以先稍等下。 ― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
@aileennian spring boot 的优势是自动配置。 这样改造意义不大~
springboot 我已经搞了。改动有些大。不过用起来确实方便不少
没必要吧?想要简单改造的话直接引入依赖,加一个启动类,引入xml就可以。如果要完全体的只能把原来的xml改成java配置的方式放到config类里边。但是java配置和xml配置本质上是一样的啊。改造的意义何在?
@Dorae132 赶时髦呗
Please answer some questions before submitting your issue. Thanks!
Which version of XXL-JOB do you using?
Expected behavior
Actual behavior
Steps to reproduce the behavior
Other information