Bael 3460 (#8550)
* Hexagonal architecture: a quick and practical example * BAEL 3486 * BAEL-3460 Airline introduction * BAEL-3460 * BAEL-3460 Airline introduction BAEL-3460 * BAEL-3460 * Formatting
This commit is contained in:
committed by
Sam Millington
parent
33849011c8
commit
0648ba53ab
@@ -0,0 +1,24 @@
|
||||
package com.baeldung.airline;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import com.github.rvesse.airline.HelpOption;
|
||||
import com.github.rvesse.airline.annotations.Command;
|
||||
import com.github.rvesse.airline.annotations.Option;
|
||||
|
||||
@Command(name = "setup-log", description = "Setup our log")
|
||||
public class LoggingCommand implements Runnable {
|
||||
|
||||
@Inject
|
||||
private HelpOption<LoggingCommand> help;
|
||||
|
||||
@Option(name = { "-v", "--verbose" }, description = "Set log verbosity on/off")
|
||||
private boolean verbose = false;
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
//skipping store user choice
|
||||
if (!help.showHelpIfRequested())
|
||||
System.out.println("Verbosity: " + verbose);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user