* 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:
mguarnaccia
2020-01-27 16:30:53 +01:00
committed by Sam Millington
parent 33849011c8
commit 0648ba53ab
4 changed files with 124 additions and 0 deletions
@@ -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);
}
}