2016-08-04 100 views
0

我使用boot建立了一個使用spring cron作業的應用程序,並且工作正常。 但我想創建一個將通過命令行執行我的cron作業的jar。 我不想使用spring boot和xml。春季可執行jar for cron作業無需啓動

我搜索了,但什麼都沒發現

我該怎麼做?我不是從那裏我應該開始

回答

0

你可以有樂趣,並添加來自母公司所有層級的依賴性越來越和所有兒童depencies:

https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-batch/1.4.0.RELEASE

<!-- Spring Batch --> 
<dependency> 
    <groupId>org.springframework.batch</groupId> 
    <artifactId>spring-batch-core</artifactId> 
    <version>3.0.7.RELEASE</version> 
</dependency> 
<dependency> 
    <groupId>org.springframework</groupId> 
    <artifactId>spring-core</artifactId> 
    <version>4.3.2.RELEASE</version> 
</dependency> 
<dependency> 
    <groupId>org.springframework</groupId> 
    <artifactId>spring-context</artifactId> 
    <version>4.3.2.RELEASE</version> 
</dependency> 
... 

很長,不好笑工作得到證明必要的依賴關係。