Is it possible to read console input just before the embedded tomcat on the spring boot starts? The supposedly application flow is, request username and password from the user,
I think this can help you.
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// prompt for the user's name
System.out.print("Enter your name: ");
// get their input as a String
String username = scanner.next();
System.out.println(username);
SpringApplication.run(Application.class, args);
}