|
16 | 16 |
|
17 | 17 | package com.iexec.worker; |
18 | 18 |
|
19 | | - |
20 | 19 | import com.iexec.worker.chain.IexecHubService; |
21 | 20 | import com.iexec.worker.feign.LoginService; |
22 | 21 | import com.iexec.worker.replicate.ReplicateRecoveryService; |
|
25 | 24 | import com.iexec.worker.worker.WorkerService; |
26 | 25 | import lombok.extern.slf4j.Slf4j; |
27 | 26 | import org.apache.commons.lang3.StringUtils; |
28 | | -import org.springframework.beans.factory.annotation.Autowired; |
29 | 27 | import org.springframework.boot.CommandLineRunner; |
30 | 28 | import org.springframework.boot.SpringApplication; |
31 | 29 | import org.springframework.boot.autoconfigure.SpringBootApplication; |
|
44 | 42 | @ConfigurationPropertiesScan |
45 | 43 | public class Application implements CommandLineRunner { |
46 | 44 |
|
47 | | - @Autowired |
48 | | - private String workerWalletAddress; |
49 | | - |
50 | | - @Autowired |
51 | | - private IexecHubService iexecHubService; |
52 | | - |
53 | | - @Autowired |
54 | | - private LoginService loginService; |
55 | | - |
56 | | - @Autowired |
57 | | - private WorkerService workerService; |
58 | | - |
59 | | - @Autowired |
60 | | - private ReplicateRecoveryService replicateRecoveryService; |
61 | | - |
62 | | - @Autowired |
63 | | - private ResultService resultService; |
| 45 | + private final String workerWalletAddress; |
| 46 | + private final IexecHubService iexecHubService; |
| 47 | + private final LoginService loginService; |
| 48 | + private final WorkerService workerService; |
| 49 | + private final ReplicateRecoveryService replicateRecoveryService; |
| 50 | + private final ResultService resultService; |
| 51 | + |
| 52 | + public Application(String workerWalletAddress, |
| 53 | + IexecHubService iexecHubService, |
| 54 | + LoginService loginService, |
| 55 | + WorkerService workerService, |
| 56 | + ReplicateRecoveryService replicateRecoveryService, |
| 57 | + ResultService resultService) { |
| 58 | + this.workerWalletAddress = workerWalletAddress; |
| 59 | + this.iexecHubService = iexecHubService; |
| 60 | + this.loginService = loginService; |
| 61 | + this.workerService = workerService; |
| 62 | + this.replicateRecoveryService = replicateRecoveryService; |
| 63 | + this.resultService = resultService; |
| 64 | + } |
64 | 65 |
|
65 | 66 | public static void main(String[] args) { |
66 | 67 | SpringApplication.run(Application.class, args); |
|
0 commit comments