title: Calling Spring Boot method from terminal
body: <p>I am researching how to call a method from the terminal.</p>
  <pre><code>@Component
  public class ApplicationAdapter implements CommandLineRunner {
  
      @Autowired
      private IApplicationPort iApplicationPort;
  
      @Override
      public void run(String... args) throws Exception {
          iApplicationPort.getAll();
          iApplicationPort.deleteStudentById((long) 1);
      }
  }
  </code></pre>
  <p>This is the main class</p>
  <pre><code>@SpringBootApplication
  public class Application {
      public static void main(String[] args) {
          SpringApplication.run(Application.class, args);
          new ApplicationAdapter();
      }
  }
  </code></pre>
  <p>I wish to call the 2 methods: <code>getAll();</code> and <code>deleteStudentById((long) 1);</code> from the terminal. How can I do that?</p>