My CommandLineRunner class
package course;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;
@Component
public class CourseCommandLineRunner implements CommandLineRunner {
@Override
public void run(String... args) throws Exception {
System.out.println("======started ============");
System.out.println("======doneeee ============");
}
}
My Main class
package com.jpa.tutorialjpa;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class TutorialJpaApplication{
public static void main(String[] args) {
SpringApplication.run(TutorialJpaApplication.class, args);
System.out.println("======LOADED=");
}
}
package structure package1 ---Main Class package2 --package2.1 ----CommandLineRunner class
I was expecting my loggers in commandlinerunner will get printed.