Question: I'm learning Spring boot. What's some typical use cases for ApplicationRunner or any runner interface? 

```
import org.junit.jupiter.api.Test;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
class PersistencedemoApplicationTests implements ApplicationRunner {

    @Test
    void contextLoads() {
    }

    @Override
    public void run(ApplicationArguments args) throws Exception {
       // load initial data in test DB
    }
}

```

This is one case I'm aware of. Anything else?

Answer: 
ApplicationRunner and CommandLineRunner are two interfaces Spring Boot provides to run any custom code just before application is fully started.

Spring-batch is a batch processing framework. This uses CommandLineRunner to register and start batch jobs at application startup.

You can also use this interface to load some master data into cache/perform health checks.

The use-case varies from application to application.
Or like this:

```
@Bean
ApplicationRunner appStarted() {
    return args -> {
        logger.info("Ready to go - args: {}", args.getNonOptionArgs());
    };
}

```