a3cc0fc0174511236a75d7452e689caab64deaeb
[SpringWebServicesForFun/.git] /
1 package de.spring.webservices.rest;
2
3 import org.springframework.boot.CommandLineRunner;
4 import org.springframework.boot.SpringApplication;
5 import org.springframework.boot.autoconfigure.SpringBootApplication;
6 import org.springframework.context.annotation.Bean;
7
8 import de.spring.webservices.rest.business.service.BusinessService;
9
10 @SpringBootApplication
11 public class Application {
12
13   public static void main(String[] args) {
14     SpringApplication.run(Application.class);
15   }
16
17
18   @Bean
19   CommandLineRunner lookup(BusinessService businessService) {
20     return args -> {
21         businessService.doSomethingWithCars();
22         
23         businessService.doSomethingWithCar(66L);
24         
25         businessService.createsNewCar();
26     };
27   }
28
29 }