Class AppCommand

java.lang.Object
info.ejava.examples.app.config.valueinject.AppCommand
All Implemented Interfaces:
org.springframework.boot.CommandLineRunner

@Component public class AppCommand extends Object implements org.springframework.boot.CommandLineRunner
  • Field Details

    • greeter

      private final Hello greeter
    • audience

      private final String audience
  • Constructor Details

    • AppCommand

      public AppCommand(Hello greeter, @Value("${app.audience:Default World}") String audience)
  • Method Details

    • run

      public void run(String... args) throws Exception
      Specified by:
      run in interface org.springframework.boot.CommandLineRunner
      Throws:
      Exception